Communication Device, Communication System, Communication Method, Communication  Program, and Communication Circuit

ABSTRACT

A transmitter ( 1 ) which transmits a predetermined amount of transfer data using an infrared ray includes: a controller ( 13 ) for transmitting an SNRM command to the other station without transmitting a station-search command (XID) for searching the other station, the SNRM command including parameters such as maximum transferable speed and maximum receivable data length of the transmitter ( 1 ); and a transmission section ( 14 ). Consequently, it is possible to shorten a time necessary for a connection between the transmitter and the receiver. This allows shortening a time from the start of communication to the end of the communication in transmitting information data.

TECHNICAL FIELD

The present invention relates to a communication device, a communicationsystem, a communication method, a communication program, and acommunication circuit, each of which allows for transmission/receptionof data.

BACKGROUND ART

Recently, as mobile phones include a camera function, image datacaptured by cameras is transferred to devices such as television setsand printers, and the devices perform a predetermined process such as animage display process.

Examples of an interface between mobile phones and television sets,printers, and personal computers are infrared methods such as IrDA(Infrared Data Association) (see Non-Patent Documents 1 and 2).

Since the infrared ray used for infrared communication such as IrDA hasdirectivity, a shield between the devices will completely disable datatransfer. However, if there is no shield between the devices, high-speeddata transfer is possible. IrDA is broken into Very Fast IR (VFIR) witha maximum speed of 16 Mbps, Fast IR (FIR) with a maximum speed of 4Mbps, and SIR with a maximum speed of 115.2 kbps. However, incommercially available products, the maximum speed is up to 4 Mbps.

FIG. 14 shows a procedure of establishment of connection of an IrLAPlayer through the IrDA standard, which is one of standards of infraredcommunication.

A primary station serves to look for the other station at the beginningof transmission. That is, the primary station requires establishment ofdata transfer state and outputs a “station search command (XIDcommand)”. On the other hand, a secondary station serves to accept therequest and outputs a “station search response (XID response)”. Arequest (order) from the primary station to the secondary station iscalled a command, and a reply from the secondary station to the primarystation is called a response.

The XID command serves to look for a potential secondary station withina certain distance in which the primary station is capable oftransmission. The slot numbers indicative of numbers in parenthesesdenote ascending numbers sequentially put on the commands.

After receiving the XID command, the secondary station outputs the XIDresponse, which is a station search response, so as to notify theprimary station of its existence. The primary station outputs apredetermined number of XID commands, and then outputs the final XIDcommand labeled with the slot number 255. That is, the command with theslot number 255 is the final command (XID-END).

Next, the primary station notifies the secondary station of parametersrequired for communication, such as maximum transferable speed andmaximum receivable data length, using a SNRM command. The secondarystation receives the command and carries out comparison between thereceived setting value and its own setting value, and then transmits aUA response to the primary station so as to notify an allowable value.

The following more specifically describes establishment of datatransmission state. In IrDA standard, the number of packets of XIDcommand transmitted from the primary station is selected from 1, 6, 8,and 16. The number is described in a Discovery flag of the XID command.As shown in FIG. 14, when 8 packets of XID command are transmitted eachtime, the 1st to 8th packets are given slot numbers from 0 to 7. Lastly,the XID-End command with the slot number of 255 is transmitted so thatthe receiving end will notify that it is the final packet. Then, afterapproximately 500 m seconds since the final packet is sent, the 1stthrough 8th packets are transmitted again. These packets are transmittedwith a time interval of 25-85 m seconds.

The secondary station does not always output the XID responseimmediately after receiving the XID command, but outputs the responseafter receiving a packet with an arbitrary (a random value) slot number.For example, when 8 packets of XID command are transmitted each time,the secondary station arbitrarily determines whether it outputs the XIDresponse after receiving the 1st packet or after receiving the 8thpacket. For example, in FIG. 14, the secondary station outputs the XIDresponse after receiving the third packet.

According to SIR, IrDA standard specifies that the XID command and theXID response are transferred at 9600 bps. This is much slower than thetransfer speed of data frame (described later), which is sent at 4 Mbps.Consequently, transmission/reception of the XID command and the XIDresponse takes a longer time. Through these processes, a procedure forsearching stations between the primary station and the secondary stationis completed.

After the procedure, the primary station notifies the secondary stationof parameters required for communication, such as maximum transferablespeed and maximum receivable data length of the primary station, using aSNRM command. The secondary station receives the command and notifiesthe primary station of parameters required for communication, such asmaximum transferable speed and maximum receivable data length of thesecondary station, using a UA response, thereby establishing an IrLAPconnection between the primary station and the secondary station, inwhich connection maximum transferable speed, maximum transferable datalength, and other parameters are set.

After the IrLAP connection using an IrLAP command packet, IrLMPconnection, TinyTP connection, and OBEX connection are established usingIrLAP data packets.

A request for an IrLMP connection from the primary station istransferred to the secondary station using an IrLAP data packet and aresponse for an IrLMP connection from the secondary station istransferred to the primary station using an IrLAP data packet, therebyestablishing an IrLMP connection.

Then, a request for a TinyTP connection from the primary station istransferred to the secondary station using an IrLAP data packet and aresponse for a TinyTP connection from the secondary station istransferred to the primary station using an IrLAP data packet, therebyestablishing a TinyTP connection.

Further, a request for an OBEX connection from the primary station istransferred to the secondary station using an IrLAP data packet and aresponse for an OBEX connection from the secondary station istransferred to the primary station using an IrLAP data packet, therebyestablishing an OBEX connection. As a result, connections allowing forinformation data transfer are established.

For disconnection, a request and a response for OBEX disconnection, arequest and a response for TinyTP disconnection, and a request and aresponse for IrLMP disconnection are transferred using IrLAP datapackets, and then a DISC command which is a request command packet forIrLAP disconnection and a UA response which is a response command packetare transmitted, thereby disconnecting a communication between theprimary station and the secondary station.

Further, in IrDA, communication is performed on a frame basis. FIG. 16shows a frame in IrDA, which is constituted of a preamble field, a startflag, an address field, a control field, a data field, a FCS, and a stopflag. Among these, the preamble field is used for generation ofreception clock which is used in a reception circuit of the receivingend. Further, the FCS includes an error detection code for detecting anerror.

Further, there are various kinds of frames, such as an I (Information)frame for information transfer, an S (Supervisory) frame forsupervision/control of communication, and a U (Unnumbered) frame forconnection or disconnection of communication. The information foridentifying those I, S U frames is contained in the control field.

Since data transmission cannot be completed within one frame in mostcases, the data is divided into plural I frames or plural UI frames.Each of I frames contains data to be transmitted in the data field, andis given a sequence number by which any omission of data can be found.With this arrangement, highly-reliable communication is realized. Eachof UI frames contains data to be transmitted in an I field, but is notgiven a sequence number by which any omission of data can be found. TheS frame has no data field for containing data, and is used fortransmission of notification of condition, such as establishment ofcommunication, or a busy state, or used for a request for retransmissionor the like. The U flame is called an unnumbered frame as it has nosequence number like those of the I frames. The U frame is used forsetting of communication mode, report of response and irregularcondition, or establishment of data link.

[Non-Patent Document 1] Infrared Data Association Serial Infrared LinkAccess Protocol (IrLAP) Version 1.1 (Jun. 16, 1996)

[Non-Patent Document 2] Infrared Data Association Serial InfraredPhysical Layer Specification Version 1.4 (May 30, 2003)

However, the above arrangement is problematic in that data transfertakes much time and efficiency for data transfer decreases.

That is, as described above, for establishment of communication, IrDArequires sensing of 500 ms, searching for stations using an XID command,exchange of negotiation parameters using SNRM and UA.

When plural communication stations exist in a communication area, it isnecessary to control stations in the area so that a communication is notprevented by light emitted from an unexpected station. However, aninfrared ray has high directivity and infrared ray communications aremostly one-to-one communications. Therefore, it is not always necessaryfor a device to automatically search for other stations in acommunication area.

Further, IrDA standard specifies that a search for other stations usingXID is performed at 9600 bps, which is comparatively lower than 4 Mbpsat which data exchange is performed. Further, as shown in FIG. 15, forinformation data transfer, after completing connection of IrLAP, anIrLMP layer, a TinyTP layer, and an OBEX layer are serially connected byserially exchanging IrLAP data packets. For disconnection, OBEX, TinyTP,IrLMP, and IrLAP are disconnected in the same order.

For the above reason, in a case where one information terminal transfersdata to another information terminal using an infrared ray, wholetransfer efficiency drops due to a time for preparing data transfer anda time for disconnection.

Further, in a case where a portable terminal transfers an image to animage display device, when a transmission error occurs, a user sometimescan be aware the transmission error with ease. For example, a case wherean image display device at a receiving end displays an image differentfrom an image the user has transferred, or a case where the imagedisplay device does not renew its display.

If it takes little time for a user to see whether user's transmission ofdata is performed successfully or not, it is not so troublesome for theuser to retransmit the data even if an assured and errorlesscommunication is not performed. Such a device only requires an abilityto receive data. A transmission circuit and a transmission device may beomitted from the device.

However, since IrDA standard specifies that a receiver outputs aresponse to a command, all receivers must include a transmission circuitand a transmission device.

DISCLOSURE OF INVENTION

An object of the present invention is to provide a communication device,a communication system, a communication method, a communication program,and a communication circuit, each of which allows reduction of a timerequired for a communication connection.

In order to achieve the foregoing objects, the communication device ofthe present invention is a communication device, serving as a primarystation which carries out communication with a secondary station,including a first protocol control section for transmitting a firstconnection request command without transmitting a station-search commandto confirm a presence of the secondary station, so that a communicationconnection between the communication device and the secondary section isestablished.

Further, the communication device of the present invention is acommunication device, serving as a secondary station which carries outcommunication with a primary station, including a first protocol controlsection for, when receiving a first connection request command from theprimary station without receiving a station-search command with whichthe primary station confirms a presence of the secondary station,transmitting a connection response to the first connection requestcommand, so that a connection is established.

Further, the communication method of the present invention is acommunication method of a communication device serving as a primarystation which carries out communication with a secondary station,including the step of transmitting a first connection request commandwithout transmitting a station-search command to confirm a presence ofthe secondary station, so that a communication connection between thecommunication device and the secondary station is established.

Further, the communication method of the present invention is acommunication method of a communication device serving as a secondarystation which carries out communication with a primary station,including the step of transmitting a connection response to a firstconnection request command from the primary station so that a connectionis established, when the communication device receives the firstconnection request command without receiving a station-search commandwith which the primary station confirms a presence of the secondarystation.

Further, the communication system of the present invention includes acommunication device serving as the primary station and a communicationdevice serving as the secondary station.

With the arrangements and the methods, when the primary stationestablishes a communication connection with the secondary station, theprimary station transmits a connection request command (e.g. SNRM inIrSimple) without transmitting a station-search command (e.g. XID inIrDA) with which the primary station confirms the presence of thesecondary station. On the other hand, when the secondary stationreceives the connection request command (corresponding to SNRM) from theprimary station without receiving the station-search command(corresponding to XID) with which the primary station confirms thepresence of the secondary station, the secondary station transmits aconnection response (e.g. UA in IrSimple) to the connection requestcommand.

With the above connection sequence, it is unnecessary to carry out acommunication for searching a station. Consequently, a connectionsequence is made simpler, which has an effect of reducing a timenecessary for a commutation connection. For example, it is possible torealize a communication protocol which reduces a time required for aconnection between the primary station and the secondary station, whichtime is the cause of decrease in transmission efficiency as a whole inIrDA. This communication protocol allows high transmission efficiency(communication efficiency) in processes including a connection request,information transmission, and disconnection.

Note that, the communication device may be realized by a computer. Atthat time, the present invention includes: a communication program whichcauses a computer to function as each section of the communicationdevice and thus realizes the communication device by the computer; and acomputer-readable storage medium in which the communication program isstored.

BRIEF DESCRIPTION OF DRAWINGS

FIG. 1 is a block diagram illustrating a transmitter of Embodiment 1 ofthe present invention.

FIG. 2 is a block diagram illustrating a receiver of Embodiment 2 of thepresent invention.

FIG. 3 is a block diagram illustrating a transmitter of Embodiment 3 ofthe present invention.

FIG. 4 is a signal sequence diagram illustrating transmission of an SNRMcommand as a first command from the transmitter.

FIG. 5 is a block diagram showing that 0xFFFFFFFF is assigned to aDestination Device Address in the SNRM command.

FIGS. 6( a) to 6(d) are block diagrams illustrating an SNRM command andan DISC command, to each of which upper layer user data is added. FIG.6( a) shows an SNRM command. FIG. 6( b) shows a DISC command. FIG. 6( c)shows a connection parameter format in IrDA. FIG. 6( d) shows a detailof the connection parameter format in IrDA.

FIGS. 7( a) to 7(c) show UA responses to each of which upper layer userdata is added. FIG. 7( a) shows a response to an SNRM command. FIG. 7(b) shows a response to a DISC command. FIG. 7( c) shows a DM response.

FIG. 8 is a signal sequence diagram illustrating transmission of an XIDcommand subsequent to transmission of the SNRM command in thetransmitter.

FIG. 9 is a signal sequence diagram illustrating a start of IrDAconnection subsequent to transmission of the SNRM command and the XIDcommand in the transmitter and the receiver.

FIG. 10 is a signal sequence diagram illustrating retransmission of anSNRM command subsequent to transmission of the SNRM command and the XIDcommand in the transmitter.

FIG. 11 is a signal sequence diagram illustrating continuous receptionof XID commands and normal IrDA connection in the transmitter and thereceiver.

FIG. 12 is a signal sequence diagram illustrating continuous receptionof an XID command and an SNRM command and transmission of a UA responsein the transmitter and the receiver.

FIG. 13 is a block diagram illustrating an SNRM command in IrDA to whichinformation indicative of a communication direction is added in thetransmitter.

FIG. 14 is a signal sequence diagram illustrating a connection procedureof IrLAP in IrDA in the transmitter and the receiver.

FIG. 15 is a signal sequence diagram illustrating a connection procedureuntil data transmission in IrDA is performed in the transmitter and thereceiver.

FIG. 16 is a block diagram illustrating a frame structure of the IrDA.

FIG. 17 is a signal sequence diagram illustrating a connection procedureof one-way connection in the transmitter and the receiver.

FIG. 18 is a signal sequence diagram illustrating a case where commandsinclude user data in the transmitter and the receiver.

FIG. 19 is a diagram illustrating an XID command format in IrDA.

FIG. 20 shows an infrared communication using a mobile phone which is anexample of the present invention.

FIG. 21 shows an infrared communication using a display device which isanother example of the present invention.

FIG. 22 shows an infrared communication using a printing device which isfurther another example of the present invention.

FIG. 23 shows an infrared communication using a recording device whichis further another example of the present invention.

FIG. 24 is a functional block diagram illustrating an LAP layer of acommunication device including both functions of IrSimple (two-waycommunication) and IrDA.

FIG. 25 is a functional block diagram illustrating an LAP layer of acommunication device including only a function of IrSimple (including afunction of one-way transmission/one-way reception).

FIG. 26 is a functional block diagram illustrating an LAP layer of acommunication device including only a function of an IrSimple one-waytransmission.

FIG. 27 is a functional block diagram illustrating an LAP layer of acommunication device including only a function of an IrSimple one-wayreception.

FIG. 28 is a table illustrating a relation between protocols of atransmitter and a receiver and a protocol after connection.

FIG. 29 is an explanatory drawing illustrating a connection procedureand examples of display of each device, in a case where a transmitter(mobile phone) and a receiver (display device such as TV) are bothIrSimple two-way communication devices.

FIG. 30 is an explanatory drawing illustrating a connection procedureand examples of display of each device, in a case where a transmitter(mobile phone) and a receiver (display device such as TV) are bothIrSimple one-way communication devices.

FIG. 31 is an explanatory drawing illustrating a connection procedureand examples of display of each device, in a case where a transmitter(mobile phone) is an IrSimple two-way communication device and areceiver (display device such as TV) is an IrSimple one-waycommunication device.

FIG. 32 is an explanatory drawing illustrating a connection procedureand examples of display of each device, in a case where a transmitter(mobile phone) carries out communication in a conventional IrDA protocoland a receiver (display device such as TV) carries out communicationboth in IrSimple two-way protocol and in IrDA protocol.

FIG. 33 is an explanatory drawing illustrating a connection procedureand examples of display of each device, in a case where a transmitter(mobile phone) carries out communication in a conventional IrDA protocoland a receiver (display device such as TV) carries out communication inIrSimple one-way.

FIG. 34 is a diagram schematically illustrating a corresponding relationamong the OSI7 hierarchical model, the IrDA hierarchical model, and thehierarchical model of the present invention.

FIG. 35( a) is a sequence diagram illustrating connection establishingin an embodiment of the present invention. FIG. 35( b) is a sequencediagram illustrating another connection establishing in the embodimentof the present invention. FIG. 35( c) illustrates a format of a packetused for the connection establishing in the embodiment of the presentinvention.

FIG. 36( a) is a diagram illustrating a data exchange sequence in theembodiment of the present invention. FIG. 36( b) is a diagramillustrating another data exchange sequence in the embodiment of thepresent invention.

FIG. 37( a) is a diagram illustrating a packet format used in dataexchange in IrDA. FIG. 37( b) is a diagram illustrating a packet formatused in data exchange in the present invention.

FIG. 38( a) is a diagram illustrating a data exchange sequence in theembodiment of the present invention. FIG. 38( b) is a diagramillustrating another data exchange sequence in the embodiment of thepresent invention.

FIG. 39( a) is a diagram illustrating a disconnection sequence in theembodiment of the present invention. FIG. 39( b) is a diagramillustrating another disconnection sequence in the embodiment of thepresent invention. FIG. 39( c) illustrates a packet format used in thedisconnection sequence in the present invention.

FIG. 40 is a sequence diagram illustrating flow of functions (commands,messages) and packets among layers in the connection sequence of theembodiment of the present invention.

FIG. 41( a) is an explanatory diagram illustrating change of data in thefunctions among the layers, which functions are indicated by rightarrows in FIG. 40 and FIG. 42 and which functions are used in theconnection sequence according to the embodiment of the presentinvention. FIG. 41( b) is a diagram illustrating a change of data in thefunctions among the layers in the embodiment of the present invention.

FIG. 42 is a sequence diagram illustrating flow of functions (commands,messages) and packets among layers in the connection sequence in theembodiment of the present invention.

FIG. 43 is a sequence diagram illustrating flow of functions (commands,messages) and packets among layers in the data exchange sequence in theembodiment of the present invention.

FIG. 44 is a diagram illustrating change of data in the functions amongthe layers, which functions are described in FIG. 43 and FIG. 45 andwhich functions are used in the data exchange sequence of the embodimentof the present invention.

FIG. 45 is a sequence diagram illustrating flow of functions and packetsamong layers in the data exchange sequence according to the embodimentof the present invention.

FIG. 46 is a sequence diagram illustrating flow of functions (commands,messages) and packets among layers in the disconnection sequence of theembodiment of the present invention.

FIG. 47( a) is an explanatory diagram illustrating change of data in thefunctions among the layers, which functions are indicated by rightarrows in FIG. 46 and FIG. 48 and which functions are used in thedisconnection sequence of the embodiment of the present invention. FIG.47( b) is an explanatory diagram illustrating a change of data in thefunctions among the layers in the embodiment of the present invention.

FIG. 48 is a sequence diagram illustrating flow of functions (commands,messages) and packets among layers in the disconnection sequence of theembodiment of the present invention.

FIG. 49 is a diagram schematically illustrating transfer of (i) data ofa connection request function and (ii) a connection parameter in aprimary station, in the embodiment of the present invention.

FIG. 50 is a diagram schematically illustrating transfer of (i) data ofa connection request function and (ii) a connection parameter in asecondary station, in the embodiment of the present invention.

FIG. 51 is a diagram schematically illustrating how a connectionconfirmation function sent from the primary station, data of aconnection notification function, and a connection parameter aretransferred in the secondary station according to the embodiment of thepresent invention.

FIG. 52 is a diagram schematically illustrating transfer of data of aconnection response function in the secondary station according to theembodiment of the present invention.

FIG. 53 is a diagram schematically illustrating transfer of a connectionparameter of a connection confirmation function in the primary station,in the embodiment of the present invention.

FIG. 54 is a diagram schematically illustrating a modified example ofthe embodiment, i.e., illustrating how data of a connection requestfunction and a connection parameter are transferred in the primarystation in cases where the connection parameter is shared by the layers.

FIG. 55 is a diagram schematically illustrating a modified example ofthe embodiment, i.e., illustrating how data of a connection notificationfunction and a connection parameter are transferred in the secondarystation in cases where the connection parameter is shared by the layers.

FIG. 56 is a diagram schematically illustrating a modified example ofthe embodiment, i.e., illustrating how data of a connection requestfunction and a connection parameter are transferred in the primarystation in cases where the layers separately send connection parametersto the lower layer.

REFERENCE NUMERALS

-   -   1: Transmitter (communication device)    -   11: CPU    -   12: Memory    -   13: Controller    -   131: Control section    -   132: Command packet generation section    -   14: Transmission section    -   2: Receiver (communication device)    -   21: CPU    -   22: Memory    -   23: Controller    -   231: Control section    -   232: Command packet generation section    -   233: Packet identification section    -   24: Transmission section    -   25: Reception section    -   26: CDR    -   3: Transmitter (communication device)    -   31: CPU    -   32: Memory    -   33: Controller    -   331: Control section    -   332: Command packet generation section    -   333: Packet identification section    -   34: Transmission section    -   35: Reception section    -   36: CDR    -   37: Timer    -   111: IrSimple-LAP control section (first protocol control        section)    -   112: IrDA-LAP control section (second protocol control section)    -   113: Protocol switching section

BEST MODE FOR CARRYING OUT THE INVENTION

With reference to FIGS. 1 to 33, the following explains embodiments of acommunication method of the present invention, and atransmission/reception circuit and a transmitter/receiver using themethod. The communication method of the present invention includes aprotocol for a communication.

[Overview]

(Communication Layer)

Each of embodiments below fully explains respective structures andoperations of a transmitter and a receiver of a communication system ofthe present invention, in accordance with the OSI7 hierarchical model.The OSI7 hierarchical model herein refers to so-called “OSI ReferenceModel” or “OSI Hierarchical Model”.

In the OSI7 hierarchical model, for realization of data communicationbetween different types of device, a communication function that acomputer should have is divided into seven layers, in each of which astandard function module is defined.

Specifically, the first layer (physical layer) serves to performelectrical conversion, mechanical operation required to output data intothe communication line. The second layer (data link layer) securesphysical communication paths, and detects error of data beingtransmitted in each of the communication paths. The third layer (networklayer) selects a communication path, and supervises addresses in thecommunication path. The fourth layer (transport layer) carries out datacompression, error correction, retransmission control etc. The fifthlayer (session layer) establishes/releases a virtual path (connection)for carrying out data transmission/reception between pluralcommunication programs. The sixth layer (presentation layer) convertsthe data received from the fifth layer into a different format suitablefor the user and converts the data transmitted from the seventh layerinto a format suitable for transmission. The seventh layer (applicationlayer) provides various available services using data communication to aperson or to a program.

Each of the communication layers of the present invention has the samefunction as that of corresponding layer in the OSI7 hierarchical model.However, it should be noted that the communication system in theembodiments has a six-layered structure in which the session layer andthe presentation layer are unified. Note that no explanation for theapplication layer is made.

The present invention is widely applicable to a communication system inwhich a transmitter and a receiver communicate with each other viarespective established connections between (i) a plurality ofcommunication layers of the transmitter and (ii) a plurality ofcommunication layers of the receiver. That is, the communicationfunction of the present invention may be divided unlike the OSI7hierarchical model. Further, the number of the communication layers canbe selected arbitrarily as long as the communication layers to beconnected with each other are plural.

Further, the present invention is preferably applicable to a wirelesscommunication in which a communication path is sometimes disconnected,such as a wireless communication using an infrared ray. This is because(i) the present invention allows an immediate connection using a firstprotocol with no station-search command and (ii) the first protocol anda second protocol which allows more assured connection using astation-search command can be switched with each other when needed. Thepresent invention is effective for other wireless communication andwired communication.

(IrSimple and IrDa)

For convenience of explanation, each of the embodiments describes“IrSimple”, one application example of the present invention. However,the present invention is not limited to IrSimple. IrSimple is made bypartly modifying the function of conventional IrDA.

In specifically explaining each embodiment, the communication method ofthe present invention is IrSimple (first protocol) and a communicationmethod combined with the above method in the same device is IrDA (secondprotocol). Such combination of IrSimple and IrDA has a merit that asingle physical layer can be used in both methods. Further, in a case ofa protocol such as IrDA in which a station-search command (XID) and aconnection request command (SNRM) are used, it is possible to performswitching of protocols, which is a later-mentioned feature of thepresent invention. The second protocol combined with IrSimple may be aprotocol other than IrDA, and may use a physical layer different fromthat used by IrSimple.

Note that, in each of the embodiments, the data link layer, the networklayer, the transport layer, and the session/presentation layer may bereferred to as LAP, LMP, SMP, and OBEX, respectively.

EMBODIMENT 1

FIG. 1 is a block diagram illustrating a structure of a transmitter(transmission/reception circuit, transmitter/receiver) 1 of the presentembodiment. As shown in FIG. 1, the transmitter 1 includes a CPU 11, amemory 12, a controller 13, and a transmission section (firsttransmission means) 14. The transmitter 1 can transmit data to outsidevia a wireless communication using an infrared ray according to IrDAstandard for example. IrDA standard is exemplified above as a wirelesscommunication method, but the method is not limited to IrDA standard.Each block of the transmitter 1 of the present embodiment may berealized by hardware logic (communication circuit) or may be realized bya CPU executing software.

The CPU 11 carries out a predetermined operation, such as a connectionrequest, in response to instruction by a user which is supplied to anoperation section (not shown). After receiving an instruction forconnection from the operation section, the CPU 11 stores data necessaryfor connection in the memory 12 if such data exists, and the CPU 11supplies a connection request to the controller 13. Then, afterreceiving from the controller 13 a transmission completion notification,which indicates completion of transmission of a connection command, theCPU 11 finishes the connection operation. The memory 12 temporarilystores data necessary for connection. This is performed through writingof the transfer data into the memory 12 by the CPU 11.

The controller 13 controls transfer of a connection request commandaccording to a connection request from the CPU 11. The controller 13includes a control section 131 and a command packet generation section132. After receiving the connection request from the CPU 11, the controlsection 131 reads out data necessary for connection from the memory 12if such data exists, and the control section 131 transmits the data tothe command packet generation section 132, and causes the command packetgeneration section 132 to generate a command packet. If data necessaryfor connection does not exit, the control section 131 causes the commandpacket generation section 132 to generate a command packet.

Further, the control section 13 detects that the command packetgenerated by the command packet generation section 132 has beentransmitted from the transmission section 14, and sends to the CPU 11 atransmission completion notification which indicates a completion ofcommand transmission.

The command packet generation section 132 generates a connection requestcommand in response to a connection request from the control section131. Further, if data to be included in the connection request commandexists, the command packet generation section 132 receives the data fromthe control section 131 and generates a connection request commandincluding the data. Transfer speed of the command packet generated bythe command packet generation section 132 is controlled by the controlsection 131. The transmission section 14 receives the packet from thecontroller 13 and transmits the packet to outside via an infraredcommunication path at a predetermined time interval.

As shown in FIG. 4, in the transmitter 1 of the present embodiment,after receiving a connection request from the CPU 11, the controlsection 131 causes the command packet generation section 132 togenerate, as a first generated packet, an SNRM packet which has settingvalues (parameters) necessary for communication, such as maximumtransferable speed and maximum receivable data length of the transmitter1, and the transmission section 14 transmits the generated packet tooutside.

EMBODIMENT 2

The following explains a receiver of the present embodiment withreference to FIG. 2. FIG. 2 is a block diagram illustrating a structureof a receiver (transmission/reception circuit, transmitter/receiver) 2of the present embodiment. As shown in FIG. 2, the receiver 2 includes aCPU 21, a memory 22, a controller 23, and a CDR (Clock Data Recovery)26, a reception section 25, and a transmission section 24. Each block ofthe transmitter 1 of the present embodiment may be realized by hardwarelogic (communication circuit) or may be realized by a CPU executingsoftware.

The reception section 25 receives the packet which has been transmittedfrom the transmitter 1 via an infrared communication path. The receptionsection 25 transmits the packet to the CDR 26. The CDR 26 extracts(recovers) a clock signal and a command signal from the received packet.Then, the CDR 26 transmits the clock signal and the command signal tothe controller 23.

The controller 23 carries out a predetermined control operation withrespect to the packet received from the CDR 26. The controller 23includes a control section 231, a command packet generation section 232and a packet identification section 233.

The packet identification section 233 receives the packet recovered bythe CDR 26, extracts command information from the packet, and transmitsthe command information to the control section 231. When data necessaryfor connection is included in the packet, the control section 231carries out writing of the data into the memory 22, and informs the CPU21 of completion of reception of the command. On the other hand, whendata necessary for connection is not included in the packet, the controlsection 231 informs the CPU 21 of completion of reception of thecommand. When data necessary for connection is included in the command,the control section 231 writes the data in the memory 22. The CPU 21carries out a process in accordance with a notification from the controlsection 231.

As shown in FIG. 4, in the receiver 2 of the present embodiment, thereception section 25 receives a packet from the transmitter 1 ofEmbodiment 1, the packet identification section 233 identifies thepacket, and when the identified packet is an SNRM command, the controlsection 231 informs the CPU 11 of transmission of a connection requestfrom the transmitter 1, the command packet generation section 232generates, as a response to the SNRM command, a UA response includingparameters such as maximum transferable speed and maximum receivabledata length of the receiver 2, and the transmission section 24 transmitsthe UA response.

EMBODIMENT 3

In the transmitter 1 of Embodiment 1, when a command packet generated bythe command packet generation section 132 is an SNRM command in IrDAshown in FIG. 5, 0xFFFFFFFF is assigned to a Destination Device Addressin the SNRM command indicative of an address of other station.0xFFFFFFFF assigned to the Destination Device Address is an unused codealthough the code is defined as a broadcast address in IrDA.Consequently, it is possible to inform a specific transmitter/receiverthat a communication method other than IrDA is used even if an SNRMcommand in IrDA is used.

Further, in the receiver 2 of Embodiment 2, when 0xFFFFFFFF is assignedto Destination Device Address in an SNRM command in IrDA received by thepacket identification section 233, it is judged that a communicationmethod other than IrDA is used, the command packet generation section232 immediately generates a UA response and the transmission section 24transmits the UA response.

EMBODIMENT 4

FIG. 6( a) shows a packet obtained by adding, to an SNRM command inIrDA, an area in which user data from an upper layer is put. The userdata is necessary for connection of the upper layer. Note that, theposition of the area is not limited to the position shown in FIG. 6( a).

FIG. 6( c) shows a format for parameters in an SNRM command in IrDA.Examples of the parameters include maximum transferable speed andmaximum receivable data length of a transmitter. The parameter formatincludes a parameter identifier (PI), a parameter length (PL), and aparameter value (PV). The parameter identifier is specific to eachparameter. After receiving an SNRM command, a station identifies theparameter identifier and knows which parameter is set. Consequently, thestation can carry out a process using the parameter. A new parameteridentifier is set to the upper layer data shown in FIG. 6( a) and theupper layer data is set as a parameter as shown in FIG. 6( d), so thatit is possible for an existing IrDA reception circuit to easily know theposition, the length, and the contents of the upper layer data, and tocarry out a process using the parameter.

FIG. 3 is a block diagram illustrating a transmitter of the presentembodiment. This is a transmitter 3, which is a modification of thetransmitter 1 in FIG. 1, in which modification a reception section 35, aCDR 36, a packet identification section 333, and a timer 37 are added.

After receiving a connection request from a CPU 31, a control section331 receives user data from the CPU 31 directly or via a memory 32. Theuser data is from an upper layer and for connection of the upper layer.Then, the control section 331 supplies the user data to a command packetgeneration section 332. The command packet generation section 332 puts,in an SNRM command, the user data as well as parameters such as maximumtransferable speed and maximum receivable data length of a transmitter,and the transmission section 34 transmits the SNRM command. An exampleof the upper layer user data is a CONNECT command of an IrDA-OBEX layer.

When the transmitter receives a UA response from the other station aftertransmitting the SNRM command, the CDR 36 recovers a clock and data froma signal received by the reception section 35, and supplies the clockand the data to the packet identification section 333. When a packetreceived by the packet identification section 333 is a UA response, thepacket identification section 333 informs the control section 331 thatthe packet is a UA response. When upper layer data exists in the UAresponse, the control section 331 writes the upper layer data in thememory 32 for example and informs the CPU 31 that the upper layer dataexists. The CPU 31 analyzes the upper layer data written in the memory32 and judges whether a SUCCESS response in OBEX is included or not.When a SUCCESS response in OBEX is not included, the CPU 31 may carryout a process for regarding connection as a failure and stopping thetransmitter from entering into a data transfer mode.

FIG. 6( b) shows a packet obtained by adding, to a DISC command, an areain which user data from an upper layer is put. The user data isnecessary for disconnection of the upper layer. The position of the areais not limited to the position shown in FIG. 6( b). The control section331 receives user data from the CPU 31 directly or via the memory 32.The user data is from an upper layer and for disconnection of the upperlayer. Then, the control section 331 supplies the user data to thecommand packet generation section 332. The command packet generationsection 332 puts the user data in a DISC command and the transmissionsection 34 transmits the DISC command. An example of the upper layeruser data is a DISCONNECT command of an IrDA-OBEX layer.

When the transmitter receives a UA response from the other station aftertransmitting the DISC command, the CDR 36 recovers a clock and data froma signal received by the reception section 35, and supplies the clockand the data to the packet identification section 333. When a packetreceived by the packet identification section 333 is a UA response, thepacket identification section 333 informs the control section 331 thatthe packet is a UA response. When upper layer data exists in the UAresponse, the control section 331 writes the upper layer data in thememory 32 for example and informs the CPU 31 that the upper layer dataexists. The CPU 31 analyzes the upper layer data written in the memory32 and judges whether a SUCCESS response in OBEX is included or not.When a SUCCESS response in OBEX is not included, the CPU 31 may regardthe connection as a failure and carries out a process accordingly.

A new parameter identifier is set to the upper layer data shown in FIG.6( b) and the upper layer data is set as a parameter as shown in FIG. 6(d), so that it is possible for an existing IrDA reception circuit toeasily know the position, the length, and the contents of the upperlayer data, and to carry out a process using the parameter.

EMBODIMENT 5

FIGS. 7( a) and 7(b) show packets each obtained by adding, to a UAresponse in IrDA, an area to which user data from an upper layer is put.The area is necessary for connection of the upper layer. New parameteridentifier is set to upper layer data shown in FIG. 7( a) and the upperlayer data is set as a parameter as shown in FIG. 6( d), so that it ispossible for an existing IrDA reception circuit to know the position,the length, and the contents of the upper layer data and can carry out aprocess using the parameters.

When a receiver 2 in FIG. 2 of the present embodiment receives an SNRMcommand from a transmitter 1, a control section 231 informs a CPU 21 ofreception of the SNRM command. When upper layer data exists in the SNRMcommand, the control section 231 writes the upper layer data in a memory22. The CPU 21 analyzes the upper layer data and judges whether aCONNECT command in OBEX is included or not in the upper layer data. Whenthe CONNECT command in OBEX is not included, the CPU 21 may regard theconnection request as invalid and does not transmit a connectionresponse. When the CPU 21 judges that the connection request from theother station exists, the CPU 21 informs the control section 231 of theconnection response. The control section 231 receives user data from theCPU 21 directly or via the memory 22. The user data is from an upperlayer and is necessary for connection of the upper layer. The controlsection 231 supplies the user data to the command packet generationsection 232. The command packet generation section 232 puts, in a UAresponse, the user data as well as parameters such as maximumtransferable speed and maximum receivable data length of the receiver.The transmission section 24 transmits the UA response. An example of theupper layer user data is a SUCCESS response of an IrDA-OBEX layer.However, the upper layer user data is not limited to this.

When it is necessary for the receiver to inform the other station thatconnection is impossible for reasons such as: an SNRM command receivedfrom the other station includes errors; the SNRM command does notinclude upper layer data; and the receiver is in an unconnectable state,the receiver may transmit a DM response shown in FIG. 7( c) instead ofthe UA response. The DM response may include upper layer data. Anexample of the upper layer data is an Internal Server Error response inOBEX, but the upper layer data is not limited to this.

FIG. 6( c) shows a format for parameters in a UA response in IrDA.Examples of the parameters include maximum transferable speed andmaximum receivable data length of the receiver. The parameter formatincludes a parameter identifier (PI), a parameter length (PL), and aparameter value (PV). The parameter identifier is specific to eachparameter. After receiving a UA response, a station identifies theparameter identifier and knows which parameter is set. Consequently, thestation can carry out a process using the parameter. A new parameteridentifier is set to the upper layer data shown in FIGS. 7( a) and 7(c)and the upper layer data is set as a parameter as shown in FIG. 6( d),so that it is possible for an existing IrDA reception circuit to easilyknow the position, the length, and the contents of the upper layer data,and to carry out a process using the parameter.

Further, when the receiver receives a DISC command, the control section231 informs the CPU 21 of reception of the DISC command and receivesuser data from the CPU 21 directly or via the memory 22. The user datais from an upper layer and is necessary for disconnection of the upperlayer. Then, the control section 231 supplies the user data to thecommand packet generation section 232, the command packet generationsection 232 puts the user data in a UA response, and the transmissionsection 24 transmits the user data. An example of the upper user data isa SUCCESS response of an IrDA-OBEX layer.

EMBODIMENT 6

In the transmitter 3 and the receiver 2 of Embodiments 4 and 5,respectively, after receiving an SNRM command including upper layer userdata in Embodiment 4, the receiver 2 of Embodiment 5 informs the CPU 21of reception of the SNRM command and supplies the user data to the CPU21 directly or via the memory 22.

The CPU 21 performs connection of the upper layer based on the upperlayer user data, and supplies user data, which is a response forconnection of the upper layer, to the control section 231 directly orvia the memory 22.

The control section 231 supplies the user data to the packet generationsection 232, the packet generation section 232 puts, in a UA response,the user data as well as parameters such as maximum transferable speedand maximum receivable data length of the receiver, and the transmissionsection 24 transmits the user data.

On the other hand, after transmitting the SNRM command including theupper layer user data, the transmitter 1 of Embodiment 4 receives the UAresponse from the transmitter/receiver, informs the CPU 31 of receptionof the response, and supplies the upper layer user data included in theUA response to the CPU 31 directly or via the memory 32. The CPU 31performs connection of the upper layer based on the upper layer userdata.

On the other hand, in the transmitter 3 and the receiver 2 ofEmbodiments 4 and 5, respectively, after receiving a DISC commandincluding upper layer data of Embodiment 4, the receiver 2 of Embodiment5 informs the CPU 21 of reception of the DISC command and supplies theupper layer user data to the CPU 21 directly or via the memory 22.

The CPU 21 performs disconnection of the upper layer based on the upperlayer user data, and supplies user data, which is a response fordisconnection of the upper layer, to the control section 231 directly orvia the memory 22. The control section 231 supplies the user data to thepacket generation section 232, the packet generation section 232 putsthe user data in a UA response, and the transmission section 24transmits the user data. At that time, when it is judged that the upperlayer data does not include a DISCONNECT command in OBEX, the requestfor disconnection is regarded as invalid and a response is nottransmitted, or a DM response including an Internal Server Errorresponse in OBEX is transmitted.

Further, a new parameter identifier is set to upper layer data in FIG.7( b) and the upper layer data is set as a parameter as shown in FIG. 6(d), so that it is possible for an existing IrDA reception circuit toeasily know the position, the length, and the contents of the upperlayer data and to perform a process using the parameter.

On the other hand, after transmitting a DISC command including upperlayer user data, the transmitter 3 of Embodiment 4 receives the UAresponse from the receiver 2, informs the CPU 31 of reception of theresponse, and supplies upper layer user data included in the UA responseto the CPU 31 directly or via the memory 32. The CPU 31 performsdisconnection of the upper layer based on the upper layer user data. Atthat time, when it is judged that a SUCCESS response in OBEX is notincluded in the received UA response, the UA response may be regarded asan invalid disconnection response and a process may be performedaccordingly.

The above procedures allow the transmitter 3 and the receiver 2 ofEmbodiments 4 and 5, respectively, to perform connections ordisconnections of all layers (from upper layers to lower layers) byexchanging packets only once. A signal sequence of the presentembodiment is shown in FIG. 18.

EMBODIMENT 7

FIG. 3 shows a transmitter 3 of the present embodiment. In thetransmitter 3, a reception section 35, a CDR 36, and a packetidentification section 333 are the same as those in the receiver 2 ofEmbodiment 2. A timer 37 counts a time in response to a request from acontrol section 331.

As shown in FIG. 8, after receiving a connection request from a CPU 31,the control section 331 causes a command packet generation section 332to generate, as a first packet, an SNRM packet including parameters suchas maximum transferable speed and maximum receivable data length of thetransmitter, and causes a transmission section 34 to transmit the SNRMpacket.

Further, at the same time as the transmission, the control section 331starts the timer 37. When the transmitter 3 does not receive a UAresponse from the receiver 2 within a predetermined time, the controlsection 331 causes the command packet generation section 332 to generatean XID command and cause the transmission section 34 to transmit the XIDcommand.

At the same time as the transmission of the XID command, the controlsection 331 starts the timer 37. When the transmitter 3 receives an XIDresponse from the receiver 2 within a predetermined time, the controlsection 331 causes the command packet generation section 332 to generatean XID-End command and transmits it, informing the CPU 31 of completionof searching a station. Subsequently, an SNRM command in IrDA isgenerated and transmitted, and a process for connection in IrDA isentered. A signal sequence of this case is shown in FIG. 9.

At the same time as the transmission of the XID command, the controlsection 331 starts the timer 37. When the transmitter 3 does not receivean XID response from the receiver within a predetermined time, thecontrol section 331 causes the command packet generation section 332 togenerate an XID-End command and transmits it, and then causes thecommand packet generation section 332 to regenerate and transmits anSNRM command including parameters such as maximum transferable speed andmaximum receivable data length of the transmitter 3. A signal sequenceof this case is shown in FIG. 10.

EMBODIMENT 8

FIG. 2 shows a receiver 2 of the present embodiment. In a case where areception section 25 receives a first command and a packetidentification section 233 identifies the first command as an XIDcommand in the receiver 2, when an XID slot indicates 1 in aDiscovery-Flag area in a command in FIG. 19, a control section 231stores reception of the XID command and wait to receive a next command,instead of transmitting an XID response. This is because: in an existingIrDA standard, an XID of 1 slot is in compliance with the IrDA standard,and accordingly it is impossible at this stage to judge whether theother station is an existing IrDA device or a device of the presentinvention. When a station-search command which was received next to thefirst command is not an XID-End command but an XID command, the processgoes to a connection process in IrDA. A signal sequence of this case isshown in FIG. 11.

In a case where the reception section 25 receives a first command andthe packet identification section 233 identifies the first command as anXID command, when an SNRM command is received next to the first command,the control section 231 informs the CPU 21 of reception of the SNRMcommand. In an existing IrDA standard, searching of a station is notcompleted until an XID response to an XID command is received.Therefore, when an SNRM command is received after an XID command, it ispossible to judge that the other station is not an existing IrDA device.Accordingly, the command packet generation section 232 generates a UAresponse and transmits it. When user data to be included in the UAresponse exists, it is possible to cause the CPU 21 to transmit the datato the control section 231 and cause the data to be included in the UAresponse. A signal sequence of this case is shown in FIG. 12.

In a case where the reception section 25 receives a first command andthe packet identification section 233 identifies the first command as anXID command, when an XID slot indicates 6, 8, or 16 other than 1 in aDiscovery-Flag area in a command shown in FIG. 19, the command packetgeneration section 232 generates an XID response based on a rulepredetermined in IrDA, and the XID response is transmitted.

EMBODIMENT 9

FIGS. 1 and 3 show transmitters 1 and 3, respectively, of the presentembodiment. FIG. 2 shows a receiver 2 of the present embodiment. Thereceiver 2 does not necessarily include the command packet generationsection 232 and the transmitter 24.

FIG. 13 shows a packet obtained by adding, to an SNRM command in IrDA, aflag area for indicating whether a communication direction is one-way ortwo-way. The position of the area is not limited to the position shownin FIG. 13. The area may be positioned in Negotiation Parameters forexample. In the present embodiment, data indicative of a communicationdirection as well as setting values (parameters) such as maximumtransferable speed and maximum receivable data length of the transmitterare included in the SNRM command to be transmitted.

As shown in FIG. 17, the transmitter 1 or 3 transmits an SNRM command inwhich a flag indicative of a communication direction indicates one-way,and starts data transmission using an I frame or a UI frame withoutwaiting for a UA response from the receiver 2. When the flag indicativeof a communication direction is positioned in the SNRM command, a formatincluding a parameter identifier (PI), a parameter length (PL), and aparameter value (PV) shown in FIG. 6( d) is used as the flag, and theparameter identifier is set to the other station beforehand.Consequently, after receiving the SNRM command, a station can knowwhether the other station requires one-way communication or two-waycommunication by identifying the parameter identifier. As a result, thestation can carry out a desired process.

On the other hand, after receiving the SNRM command, the receiver 2waits data transmission using the I frame or the UI frame of thetransmitter without transmitting a UA response. When the received SNRMcommand does not include the upper layer data, the receiver 2 regardsthe SNRM command as an invalid connection request and does not enter astate for waiting data transmission. Alternatively, when a CONNECTcommand in OBEX is not included in the upper layer data, the receiver 2regards the SNRM command as an invalid connection request and does notenter a state for waiting data transmission.

One-way communication realized by the above method is applicable to acase where: data transmission needs little time, a user can easilyrecognize data transmission error, and the user can carry out againtransmission of the data. For example, a case where the user transmitsimage data from an information terminal to an image display device andsee the image. The user can recognize data transmission error when, forexample, image data transmitted by the user is not displayed by an imagedisplay device at a receiving end, or an image different from an imagetransmitted by the user is displayed.

The transmitter 1 in FIG. 1 is applicable only to one-way communication.The transmitter 3 in FIG. 3 is applicable both to one-way communicationand two-way communication.

EMBODIMENT 10

Further, in the receiver 2 shown in FIG. 2, in a case where a connectionwith the other station is established using any one of the methods ofthe present invention, when a disconnection request comes from an upperlayer managed by the CPU 21, disconnection request data is transmittedto the control section 231 via the memory 22. The control section 231transmits the disconnection request data to the packet generationsection 232, the packet generation section 232 puts this user data in aDM response, and the transmission section 24 transmits the DM response.The disconnection request is issued at a time when, for example, a userselects disconnection of communication. However, the example is notlimited to this case. An example of the disconnection request data is anInternal Server Error response in OBEX. However, the disconnectionrequest data is not limited to this.

Further, a new parameter identifier is set to the upper layer data inFIG. 7( c) and the upper layer data is set as a parameter as shown inFIG. 6( d), so that it is possible for an existing IrDA receptioncircuit to easily know the position, the length, and the contents of theupper layer data and to perform a process using the parameter.

EMBODIMENT 11

With reference to FIG. 20, the present embodiment explains a case wherethe communication methods explained in the above embodiments are appliedto a communication between mobile phones.

In the present embodiment, the mobile phones are respectively used for atransmitter and a receiver. However, only either one of the transmitterand the receiver may be a mobile phone. That is, when either one of thetransmitter and the receiver is a mobile phone, the other device may notbe a mobile phone as long as data transmission and reception can becarried out therebetween via an infrared ray or the like in accordancewith any one of the aforementioned communication methods of the presentinvention.

FIG. 20 illustrates that the mobile phone A transmits data therein tothe mobile phone B by using an infrared ray. When the mobile phone Breceives the data from the mobile phone A, the mobile phone B stores thereceived data in either a built-in memory thereof or an external memoryconnected thereto. Examples of the data include text data, image data,audio data, telephone directory data, system information, and the like,and the data is not limited to one complying with a specific format.Further, the data stored in the mobile phone A may be either (i) datastored in a built-in memory of the mobile phone A or (ii) data stored inan external memory (a non-volatile memory such as an SD card) connectedto the mobile phone A.

Upper layer data is positioned in an SNRM command and a UA response, andthe SNRM command and the UA response are transmitted using the aboveconnection methods. Consequently, it is possible to transmit the upperlayer to the other station using only one packet. Therefore, it ispossible to complete connection in a shorter time compared with aconventional connection method in IrDA using plural packets. Thisshortens a time for a user to point a device at the other stationcompared with a conventional IrDA communication. For that reason, thepresent invention is expected to increase user-friendliness and todecrease the possibility of generation of errors.

EMBODIMENT 12

With reference to FIG. 21, the present embodiment explains a case wherethe communication methods explained in the above embodiments are appliedto a communication between a mobile phone and a display device. In thepresent embodiment, a transmitter is a mobile phone. However, thetransmitter may not be a mobile phone as long as data transmission canbe carried out via an infrared ray or the like in accordance with anyone of the aforementioned methods of the present invention.

FIG. 21 illustrates that a mobile phone A transmits data therein to adisplay device B (e.g. TVs, monitors, and the like) by using an infraredray. The display device B carries out an appropriate process withrespect to the data sent from the mobile phone A, in order to carry outdisplay. For example, in a case where the data from the mobile phone Ais image data, the image data is decompressed if necessary for the sakeof carrying out the display. However, the present invention is notlimited to this. Further, examples of the data include text data, imagedata, audio data, telephone directory data, system information, and thelike, and the data is not limited to one complying with a specificformat. Further, the data stored in the mobile phone A may be either (i)data stored in a built-in memory of the mobile phone A or (ii) datastored in an external memory (a non-volatile memory such as an SD card)connected to the mobile phone A.

Upper layer data is positioned in an SNRM command and a UA response, andthe SNRM command and the UA response are transmitted using the aboveconnection methods. Consequently, it is possible to transmit the upperlayer to the other station using only one packet. Therefore, it ispossible to complete connection in a shorter time compared with aconventional connection method in IrDA using plural packets. Thisshortens a time for a user to point a device at the other stationcompared with a conventional IrDA communication. For that reason, thepresent invention is expected to increase user-friendliness and todecrease the possibility of generation of errors.

EMBODIMENT 13

With reference to FIG. 22, the present embodiment explains a case wherethe communication methods explained in the above embodiments are appliedto a communication between a mobile phone and a printing device. In thepresent embodiment, a transmitter is a mobile phone. However, thetransmitter may not be a mobile phone as long as data transmission canbe carried out via an infrared ray or the like in accordance with anyone of the aforementioned methods of the present invention.

FIG. 22 illustrates that the mobile phone A transmits data therein tothe printing device B by using an infrared ray. The printing device Bcarries out an appropriate process with respect to the data sent fromthe mobile phone A, in order to carry out printing. For example, in acase where the data from the mobile phone A is image data, the imagedata is decompressed if necessary for the sake of carrying out theprinting. However, the present invention is not limited to this.Further, examples of the data include text data, image data, audio data,telephone directory data, system information, and the like, and the datais not limited to one complying with a specific format. Further, thedata stored in the mobile phone A may be either (i) data stored in abuilt-in memory of the mobile phone A or (ii) data stored in an externalmemory (a non-volatile memory such as an SD card) connected to themobile phone A.

Upper layer data is positioned in an SNRM command and a UA response, andthe SNRM command and the UA response are transmitted using the aboveconnection methods. Consequently, it is possible to transmit the upperlayer to the other station using only one packet. Therefore, it ispossible to complete connection in a shorter time compared with aconventional connection method in IrDA using plural packets. Thisshortens a time for a user to point a device at the other stationcompared with a conventional IrDA communication. For that reason, thepresent invention is expected to increase user-friendliness and todecrease the possibility of generation of errors.

EMBODIMENT 14

With reference to FIG. 23, the present embodiment explains a case wherethe communication methods explained in the above embodiments are appliedto a communication between a mobile phone and a recording device. In thepresent embodiment, a transmitter is a mobile phone. However, thetransmitter may not be a mobile phone as long as data transmission canbe carried out via an infrared ray or the like in accordance with anyone of the aforementioned methods of the present invention.

FIG. 23 illustrates that the mobile phone A transmits data therein tothe recording device B by using an infrared ray. The recording device Bcarries out an appropriate process with respect to the data sent fromthe mobile phone A. For example, in a case where the data from themobile phone A is image data, the image data is recorded in a memory ofthe recording device B or recorded in an external memory connected tothe recording device B. The memory of the recording device B may be anymedium as long as it is capable of storing data temporarily orsemi-permanently. Examples of the memory include: a volatile memory suchas an SDRAM; a non-volatile memory such as a flash memory; a recordableDVD; and a HD drive. Further, examples of the data include text data,image data, audio data, telephone directory data, system information,and the like, and the data is not limited to one complying with aspecific format. Further, the data stored in the mobile phone A may beeither (i) data stored in a built-in memory of the mobile phone A or(ii) data stored in an external memory (a non-volatile memory such as anSD card) connected to the mobile phone A.

Upper layer data is positioned in an SNRM command and a UA response, andthe SNRM command and the UA response are transmitted using the aboveconnection methods. Consequently, it is possible to transmit the upperlayer to the other station using only one packet. Therefore, it ispossible to complete connection in a shorter time compared with aconventional connection method in IrDA using plural packets. Thisshortens a time for a user to point a device at the other stationcompared with a conventional IrDA communication. For that reason, thepresent invention is expected to increase user-friendliness and todecrease the possibility of generation of errors.

EMBODIMENT 15

With reference to FIGS. 24 to 27, the present embodiment details afunction of an LAP layer for realizing the communication methodsexplained in the above embodiments.

(1) Case of IrSimple Two-Way Communication+IrDa Communication

FIG. 24 is a functional block diagram illustrating an LAP layer 100A ofa communication device including both functions of IrSimple (two-waycommunication) and IrDA.

The LAP layer 100A includes a protocol control section 110A, a timer120, a transmission request command analysis section 130, a transmissionupper layer data storage section 140, a transmission frame generationsection 150, a reception frame analysis section 160, a reception upperlayer data storage section 170, and a reception command notificationgeneration section 180.

The protocol control section 110A controls a protocol of the LAP layer.For that reason, the protocol control section 110A includes anIrSimple-LAP control section (first protocol control section) 111, anIrDA-LAP control section (second protocol control section) 112, and aprotocol switching section 113.

The IrSimple-LAP control section 111 carries out a communication usingan IrSimple-LAP protocol. For that reason, the IrSimple-LAP controlsection 111 includes a connection control section 111 a, a datatransmission control section 111 b, and a disconnection control section111 c. The connection control section 111 a carries out a connectionprocess using the IrSimple-LAP protocol. The data transmission controlsection 111 b carries out data transmission using the IrSimple-LAPprotocol. The disconnection control section 111 c carries out adisconnection process using the IrSimple-LAP protocol. At a time ofconnection, the IrSimple-LAP control section 111 causes the connectioncontrol section 111 a to carry out a connection process. At a time ofdata transmission, the IrSimple-LAP control section 111 causes the datatransmission control section 111 b to carry out data transmission. At atime of disconnection, the IrSimple-LAP control section 111 causes thedisconnection control section 111 c to carry out a disconnectionprocess.

The IrDA-LAP control section 112 performs a communication using anIrDA-LAP protocol. For that reason, the IrDA-LAP control section 112includes a connection control section 112 a, a data transmission controlsection 112 b, and a disconnection control section 112 c. The connectioncontrol section 112 a carries out a connection process using theIrDA-LAP protocol. The data transmission control section 112 b carriesout data transmission using the IrDA-LAP protocol. The disconnectioncontrol section 112 c carries out a disconnection process using theIrDA-LAP protocol. At a time of connection, the IrDA-LAP control section112 causes the connection control section 112 a to carry out aconnection process. At a time of data transmission, the IrDA-LAP controlsection 112 causes the data transmission control section 112 b to carryout data transmission. At a time of disconnection, the IrDA-LAP controlsection 112 causes the disconnection control section 112 c to carry outa disconnection process.

The protocol switching section 113 switches between the IrSimple-LAPcontrol section 111 and the IrDA-LAP control section 112. Specifically,in a case of a transmitter (primary station), the protocol switchingsection 113 initially causes the IrSimple-LAP control section 111 tooperate. After receiving an XID response which is sent in response to astation-search command subsequent to an SNRM command (connection requestcommand), the protocol switching section 113 switches to the IrDA-LAPcontrol section 112. Further, in a case of a receiver (secondarystation), the protocol switching section 113 initially causes theIrSimple-LAP control section 111 to operate. After continuouslyreceiving XID commands (1 slot) each of which is a station-searchcommand, or after receiving an XID command (other than 1 slot), theprotocol switching section 113 switches to the IrDA-LAP control section112 after transmission of an XID response and then reception of anXID-End. Both in cases of the primary section and the secondary section,if communication is disconnected, the protocol switching section 113switches to the IrSimple-LAP control section 111 again so that aconnection using the IrSimple-LAP protocol is carried out.

The timer 120 is controlled by the protocol control section 110A. Thetimer 120 is used, for example, at a time when the protocol controlsection 110A checks time-out.

The transmission request command analysis section 130 analyzes atransmission request command from an upper layer (LMP layer). Examplesof the transmission request command include a connection request, a datatransmission request, and a disconnection request. The protocol controlsection 130 is informed of a result of the analysis.

The transmission upper layer data storage section 140 storestransmission data from an upper layer (LMP layer). The stored data istransmitted to the transmission frame generation section 150 and ispositioned in the transmission frame.

The transmission frame generation section 150 generates a transmissionframe to be transmitted to a lower layer (PHY layer). The transmissionframe is generated based on the data from the transmission upper layerdata storage section 140. In a case of the primary station, examples ofthe transmission frame include an SNRM command (connection request), aUI command (data transmission request), and a DISC command(disconnection request). In a case of the secondary station, examples ofthe transmission frame include a UA response (connection response anddisconnection response) and a UI response (data transmission response).

The reception frame analysis section 160 analyzes a reception frame fromthe lower layer (PHY layer), and informs the protocol control section110A of a result of the analysis. Further, the reception frame analysissection 160 stores, in the reception upper layer data storage section170, upper layer data which was extracted in the analysis.

The reception upper layer data storage section 170 stores the upperlayer data which was analyzed and extracted by the reception frameanalysis section 160. The stored data is transmitted to the upper layer(LMP layer).

The reception command notification generation section 180 generates areception command in response to a reception command notificationgeneration request from the protocol control section 110A, and informsthe upper layer (LMP layer) of the reception command. Examples of thereception command include a connection request reception command, a datatransmission request reception command, and a disconnection requestreception command.

(2) Case of IrSimple Two-Way Communication (Including One-WayTransmission and One-Way Reception)

FIG. 25 is a functional block diagram illustrating an LAP layer 100B ofa communication device including only a function of IrSimple (includingone-way transmission and one-way reception).

The LAP layer 100B includes a protocol control section 110B, a timer120, a transmission request command analysis section 130, a transmissionupper layer data storage section 140, a transmission frame generationsection 150, a reception frame analysis section 160, a reception upperlayer data storage section 170, and a reception command notificationgeneration section 180. That is, the LAP layer 100B is different fromthe LAP layer 100A in that the LAP layer 100B includes the protocolcontrol section 110B instead of the protocol control section 110A.

The protocol control section 110B controls a protocol of an LAP layer.For that reason, the protocol control section 110B includes anIrSimple-LAP control section 111. That is, the protocol control section110B does not include the IrDA-LAP control section 112 and the protocolswitching section 113 which are included in the protocol control section110A.

The LAP layer 100B is identical with the LAP layer 100A except for theabove points. Therefore, explanations of the LAP layer 100B are omittedhere.

(3) Case of IrSimple One-Way Transmission

FIG. 26 is a functional block diagram illustrating an LAP layer 100C ofa communication device including only a function of an IrSimple one-waytransmission.

The LAP layer 100C includes a protocol control section 110C, a timer120, a transmission request command analysis section 130, a transmissionupper layer data storage section 140, and a transmission framegeneration section 150. That is, the LAP layer 100C is different fromthe LAP layer 100A in that the LAP layer 100C includes the protocolcontrol section 110C instead of the protocol control section 110A, andthe LAP layer 100C does not include the reception frame analysis section160, the reception upper layer data storage section 170, and thereception command notification generation section 180 which arefunctions at a receiving end.

The protocol control section 110C controls a protocol of an LAP layer ina transmitter. For that reason, the protocol control section 110Cincludes an IrSimple-LAP control section 111C. That is, the protocolcontrol section 110C does not include the IrDA-LAP control section 112and the protocol switching section 113 which are included in theprotocol control section 110A. Note that, the IrSimple-LAP controlsection 111C includes only a transmission function in IrSimple. That is,the IrSimple-LAP control section 111C includes a connection controlsection 111Ca, a data transmission control section 111Cb, and adisconnection control section 111Cc, which perform a connection process,a data transmission process, and a disconnection process, respectively,in the transmitter.

The LAP layer 100C is identical with the LAP layer 100A except for theabove points. Therefore, explanations of the LAP layer 100C are omittedhere.

(4) Case of IrSimple One-Way Reception

FIG. 27 is a functional block diagram illustrating an LAP layer 100D ofa communication device including only a function of an IrSimple one-wayreception.

The LAP layer 100D includes a protocol control section 110D, a timer120, a reception frame analysis section 160, a reception upper layerdata storage section 170, and a reception command notificationgeneration section 180. That is, the LAP layer 100D is different fromthe LAP layer 100A in that the LAP layer 100D includes the protocolcontrol section 110D instead of the protocol control section 110A, andthe LAP layer 100D does not include the transmission request commandanalysis section 130, the transmission upper layer data storage section140, and the transmission frame generation section 150 which arefunctions at a transmitting end.

The protocol control section 110D controls a protocol of an LAP layer ina receiver. For that reason, the protocol control section 110D includesan IrSimple-LAP control section 111D. That is, the protocol controlsection 110D does not include the IrDA-LAP control section 112 and theprotocol switching section 113 which are included in the protocolcontrol section 110A. Note that, the IrSimple-LAP control section 111Dincludes only a reception function in IrSimple. That is, theIrSimple-LAP control section 111D includes a connection control section111Da, a data transmission control section 111Db, and a disconnectioncontrol section 111Dc, which perform a connection process, a datatransmission process, and a disconnection process, respectively, in thereceiver.

The LAP layer 100D is identical with the LAP layer 100A except for theabove points. Therefore, explanations of the LAP layer 100D are omittedhere.

EMBODIMENT 16

With reference to FIGS. 28 to 33, the present embodiment explains acombination of a protocol of a transmitter and a protocol of a receiver.

FIG. 28 is a table illustrating a relation between protocols of atransmitter and a receiver and a protocol after connection between thetransmitter and the receiver has been established. As shown in FIG. 28,the protocol after the connection varies in accordance with whatprotocols the transmitter and the receiver support out of IrSimpletwo-way/one-way protocols and an IrDA protocol.

(Mobile Phone, Display Device, Recording Device, and Printing DeviceUsing IrSimple-Lap)

In a case of data transmission from a transmitter such as a mobile phoneto a receiver such as a display device, a recording device, and aprinting device, there is a possibility that the mobile phone displaysonly a selection window via which a user selects infrared communication,and the mobile phone does not provide selections of protocols. Further,in general, a receiver such as a display device, a recording device, anda printing device only provides an interface via which a user makesinfrared communication ON or OFF.

In a case where protocols of the transmitter and the receiver differfrom each other under such circumstances, when a combination ofprotocols which allows for communication between the transmitter and thereceiver can be selected, the transmitter and the receiver of thepresent invention switch protocols as described above. When acombination of protocols which allows for communication cannot beselected, for example, the transmitter and the receiver of the presentinvention notifies a user of a reason for unableness of communicationbetween the transmitter and the receiver. Examples of the reasoninclude: a connection request for a one-way communication device tocarry out a two-way communication; and a connection request for anon-IrDA device to carry out an IrDA communication.

In a display device (e.g. mobile phone and TV), a printing device, and arecording device etc. having a display section, when connection isestablished, the display section displays a protocol used in theconnection. When connection is not established, the display section notonly displays that the connection is not established, but also displaysthe reason why the connection is not established. In this manner,notification of the reason for unableness of communication is performed.With the notification, a user can deal with the unableness properly(e.g. updating of firmware for supporting an unsupported communicationprotocol).

The following describes some examples. In the following, a displaydevice such as a TV is taken for instance of a receiver. However, thereceiver is not limited to the display device as long as it is a devicehaving a display section capable of displaying texts. The receiver maybe a printing device or a recording device for example. Further, amobile phone is taken for instance of a transmitter. However, thetransmitter is not limited to the mobile phone as long as it is a devicehaving a display section capable of displaying texts. The transmittermay be a display device (e.g. TV), a printing device, or a recordingdevice.

(1) Connection Between IrSimple Two-Way Communication Devices

FIG. 29 is an explanatory drawing illustrating a connection procedureand how each device displays, in a case where a transmitter (mobilephone) and a receiver (display device such as TV) are both IrSimpletwo-way communication devices.

Right after transmitting SNRM in an IrSimple protocol, the transmitter(mobile phone) receives UA. Consequently, the transmitter causes adisplay section to notify a user that a connection between thetransmitter and the receiver in the IrSimple protocol has beenestablished.

On the other hand, the receiver (display device such as TV) receivesSNRM before an XID command, and thus recognizes that the transmitter isan IrSimple device. The receiver transmits UA, and thus establishes aconnection in IrSimple. At that time, the receiver causes a displaysection to notify that a connection in IrSimple has been established.

With the above operation, the user can easily know a protocol after aconnection between the transmitter and the receiver has beenestablished.

Instead of displaying a connection protocol after a connection has beenestablished, a communication protocol may be notified aftercommunication has been finished, using a communication log indicative ofcommunication just before the finish. Alternatively, instead ofautomatically displaying a communication protocol, a communicationprotocol may be displayed as a result of selection of a menu by a user.

(2) Connection Between IrSimple One-Way Communication Devices

FIG. 30 is an explanatory drawing illustrating a connection procedureand how each device displays, in a case where a transmitter (mobilephone) and a receiver (display device such as TV) are both IrSimpleone-way communication devices.

After transmitting SNRM in an IrSimple protocol, the transmitter (mobilephone) causes a display section to notify a user that a connectionbetween the transmitter and the receiver in the IrSimple protocol hasbeen established.

On the other hand, the receiver (display device such as TV) receivesSNRM before an XID command, and thus recognizes that the transmitter isan IrSimple device and establishes a connection in IrSimple. At thattime, the receiver causes a display section to notify that a connectionin IrSimple has been established.

With the above operation, the user can easily know a protocol after aconnection between the transmitter and the receiver has beenestablished.

Instead of displaying a connection protocol after a connection has beenestablished, a communication protocol may be notified aftercommunication has been finished, using a communication log indicative ofcommunication just before the finish. Alternatively, instead ofautomatically displaying a communication protocol, a communicationprotocol may be displayed as a result of selection of a menu by a user.

(3) Connection Between IrSimple Two-Way Device and IrSimple One-WayDevice

FIG. 31 is an explanatory drawing illustrating a connection procedureand how each device displays, in a case where a transmitter (mobilephone) is an IrSimple two-way communication device and a receiver(display device such as TV) is an IrSimple one-way communication device.

After transmitting SNRM (one-way/two-way selection flag indicatestwo-way communication) in an IrSimple protocol, the transmitter (mobilephone) does not receive a UA response from the receiver within apredetermined time. Consequently, the transmitter regards thecommunication as an error, and causes a display section to notify a userof the communication error.

On the other hand, the receiver (display device such as TV) receivesSNRM before an XID command and thus recognizes that the transmitter isan IrSimple communication device. While the one-way/two-way selectionflag in the SNRM indicates two-way communication, the receiver supportsonly one-way communication. Accordingly, the receiver regards thecommunication as an error, and causes a display section to notify theuser of the communication error. At that time, the reason for thecommunication error is also displayed by the display section. Thisallows a user's response such as changing a communication mode of thetransmitter to a one-way mode, or such as updating firmware of thedisplay device so that the display device newly supports a two-wayprotocol.

Instead of automatically displaying a communication protocol, acommunication protocol may be displayed as a result of selection of amenu by a user.

(4) Connection Between IrDa Communication Device and IrSimple+IrDaCommunication Device

FIG. 32 is an explanatory drawing illustrating a connection procedureand how each device displays, in a case where a transmitter (mobilephone) carries out communication in a conventional IrDA protocol and areceiver (display device such as TV) carries out communication both inIrSimple two-way protocol and in IrDA protocol.

After transmitting an XID command in IrDA protocol, the transmitter(mobile phone) receives an XID response from the receiver. In responseto the XID response, the transmitter transmits an XID-End command andthen transmits SNRM in a conventional IrDA format. At a time when thetransmitter receives a UA response, the transmitter regards a connectionin IrDA as being established, and causes a display section to notify auser of the establishment.

On the other hand, the receiver (display device such as TV) completessearching of a station in IrDA through transmission/reception of the XIDcommand, the XID response, and the XID-End. Then, the receiverestablishes a connection in IrDA at a time when the receiver transmits aUA response to the SNRM command in IrDA format from the transmitter. Thereceiver causes a display section to notify a user of the establishmentof the connection. At that time, the receiver displays that theconnection was carried out in IrDA but a connection in IrSimple would bepossible if the transmitter would support an IrSimple protocol. Thisallows a user's response such as updating of firmware of thetransmitter, so that the transmitter newly supports an IrSimple two-wayprotocol.

Instead of displaying a connection protocol after a connection has beenestablished, a communication protocol may be notified aftercommunication has been finished, using a communication log indicative ofcommunication just before the finish. Alternatively, instead ofautomatically displaying a communication protocol, a communicationprotocol may be displayed as a result of selection of a menu by a user.

(5) Connection Between IrDa Communication Device and IrSimpleCommunication Device

FIG. 33 is an explanatory drawing illustrating a connection procedureand how each device displays, in a case where a transmitter (mobilephone) carries out communication in a conventional IrDA protocol and areceiver (display device such as TV) carries out communication inIrSimple one-way protocol.

The transmitter (mobile phone) transmits an XID command and an XID-Endcommand, but the transmitter cannot receive an XID response from thereceiver. Consequently, after a predetermined time has passed, thetransmitter regards the communication as an error, and causes a displaysection to notify a user of the communication error.

On the other hand, the receiver (display device such as TV) receivesSNRM before an XID command and thus recognizes that the transmitter isan IrSimple communication device. However, the receiver does not includean IrDA protocol. Accordingly, the receiver regards the communication asan error, and causes a display section to notify the user of thecommunication error. At that time, the reason for the communicationerror is also displayed by the display section. This allows a user'sresponse such as updating firmware of the display device so that thedisplay device newly supports an IrSimple two-way protocol.

Instead of automatically displaying a communication protocol, acommunication protocol may be displayed as a result of selection of amenu by a user.

EMBODIMENT 17

The following will describe another embodiment of the present inventionin reference to FIGS. 34 to 56. The communication protocols described inthe present embodiment are applicable to embodiments 1 to 16. The termsdefined in embodiments 1 to 16 are used in the present embodimentaccording to the same definitions unless otherwise noted.

(1) Communication Layers

FIG. 34 is a schematic diagram for relationship among the OSI 7-layermodel, the IrDA layers, and the layers of the communication system ofthe present invention.

The communication system according to the present embodiment is dividedinto communication layers with equivalent functions to those of thelayers in the OSI 7-layer model. However, as shown in FIG. 34, thecommunication system has a six-layer structure in which the sessionlayer and the presentation layer are merged into a single layer.

For ease of explanation, the present embodiment will describe theinvention as applied to IrSimple as an example. However, the presentinvention is by no means limited to IrSimple. IrSimple is an improvedversion of conventional IrDA.

In the present embodiment, the data link layer, the network layer, thetransport layer, and the session/presentation layer may be referred toas LAP, LAMP, SMP, and OBEX, respectively, in accordance with IrSimple.To distinguish between the communication layers in the transmitter andthose in the receiver, the layers in the transmitter (primary station)are indicated by “P,” and those in the receiver (secondary station) by“S.” For example, “LAP(P)” denotes the data link layer in thetransmitter.

(2) Sequence between Transmitter and Receiver

(2-1) Connection Sequence [A] Response is Sent

FIG. 35( a) is a sequence diagram showing a connection sequenceaccording to the present embodiment (response is sent). FIG. 35( c) isan illustration of the structure of communication data used in theconnection sequence of the present embodiment (response is sent).

In the present embodiment (response is sent), a global address is usedfor the destination device address of an SNRM command, thereby giving asearching function to the SNRM command (SNRM command in FIG. 35( c)).

Furthermore in the present embodiment (response is sent), the SNRMcommand, which is a connection packet for the data link layer, and theUA response contain parameters and commands required in the connectionof the upper layers, such as the network layer, the transport layer, thesession layer, and the presentation layer. Accordingly, the presentembodiment uses only one connection packet, rather than several asrequired in conventional IrDA, to connect all of the upper layers.

Thus, the present embodiment carries out the search and connectionsequence with a single pair of packets, rather than a plurality ofpackets as required in conventional cases.

[B] No Response is Sent

FIG. 35( b) is a sequence diagram showing a connection sequenceaccording to the present embodiment (no response is sent). FIG. 35( c)is an illustration of the structure of communication data used in theconnection sequence of the present embodiment (no response is sent).Note that in the present embodiment (no response is sent), the UAresponse (UA response for SNRM in FIG. 35( c)) is not required.

A communication mode which involves no response from the receiver may beselected depending on the user, application, or data type. When such amethod is selected, the SNRM command alone can complete both search andconnection as shown in FIG. 35( b).

The connection sequence of the present embodiment, as explained above,reduces the time required to make a connection by handling allconnection requests for the plural communication layers at the sametime, and therefore can easily recover from a disconnection of thecommunication path. In view of this, the connection sequence isparticularly suitable for wireless communication in which thecommunication path is easily cut off (e.g. infrared communication). Notethat the connection sequence is effective also with other wireless andwired communication, including IEEE 802.11 and Bluetooth.

The present embodiment will describe an example in which all thecommunication layers are connected by a single round of communication.The present invention is not limited to such cases. For example, thepresent invention may be arranged so that one communication layer isconnected first, and the remaining two or more communication layers areconnected thereafter. Alternatively, a connection for one communicationlayer may be established through plural rounds of communication. Forexample, given that two rounds of communication are required toestablish a connection for the network layer, the connection of the datalink layer and the first of the two rounds of communication for theconnection of the network layer may be handled by one connectionrequest, and the second round of communication for the connection of thenetwork layer and the connection of the transport layer may be handed byone connection request.

(2-2) Data Exchange Sequence [A] Response is Sent

FIGS. 36( a), 36(b) are sequence diagrams each showing a data exchangesequence according to the present embodiment (response is sent). FIG.36( a) is an illustration of the structure of communication data used inthe data exchange sequence of the present embodiment (response is sent).

In the present embodiment (response is sent), a response from a lowerlayer/upper layer is not transmitted for each data, thereby reducing thenumber of responses as many as possible. Then, a response is sent as topresence of an error after a large amount of data is transmitted.

In data communication, the transmitter uses (i) a flag for asking thereceiver if there is any problem in the sequence of packet number or inthe data received and (ii) a packet constituted of plural data itemscreated by dividing the data according to the packet size.

As shown in FIG. 36( a), the transmitter transmits a predeterminednumber of packets, and then transmits a packet in which the flag is on.If the receiver on the other end has detected no error since the startof receiving the data or since a previous response sent in reply to apacket in which the flag is on, the receiver notifies the transmitter ofproper transmission. If an error is detected, the receiver ignores thedata items after the missed packet, and only confirms the flag. When itis confirmed that the flag is on, the receiver informs the transmitterof the packet number of the packet which ahs not been received due tothe error.

When the transmitter is notified of a proper transmission from thereceiver, the transmitter continues to transmit a next packet. When itis notified of an error, the transmitter retransmits the packets,starting with the packet which was not properly received and ending withthe packet bearing the turned-on flag.

With this, the interval between packets is reduced, thereby efficientlyperforming transmission.

As shown in FIG. 36( a), the present embodiment (response is sent) usesan UI frame (FIG. 37( b)). Therefore, the data link layer (LAP layer) isincapable of recognizing missing of packets, and the missing is detectedby the transport layer.

In the UI frame, the data for the transport layer contains thesequential number, a flag for confirming the data, a flag for informingas to whether the packet is the final packet of the data, and a flag forchecking if there is any problem in the received data. The datatransmission is carried out using these flags.

[B] No Response is Sent

FIGS. 38( a), 38(b) are sequence diagrams each showing a data exchangesequence according to the present embodiment (no response is sent). FIG.38( b) is an illustration of the structure of communication data used inthe data exchange sequence of the present embodiment (no response issent).

In the present embodiment (no response is sent), if no response from thereceiver is needed, only the completeness of data is confirmed.Therefore, the transmitter puts a sequential number on each packet, andtransmits all the data at once.

The receiver only confirms whether there is any error in thetransmission. When all the packets (data) are properly received, theproper completion of data is perceived in the receiver, and the nextoperation is carried out, which is display, printing, storing, etc. ofthe received data. On the other hand, when an error is detected, theerror is perceived in the receiver, and a different operation is carriedout, which is error indication to the user, stand-by for the next data,etc.

Note that the present embodiment (no response is sent) also uses the UIframe (FIG. 37( b)) shown in FIG. 38(b).

(2-3) Disconnection Sequence [A] Response is Sent

FIG. 39( a) is a sequence diagram showing a disconnection sequence ofthe present embodiment (response is sent). FIG. 39( c) is anillustration of the structure of communication data used in thedisconnection sequence of the present embodiment (response is sent).

As shown in FIG. 39( c), in the present embodiment (response is sent),the DISC command and the UA response contain the parameters and commandsrequired for a disconnection of the upper layers. such as the networklayer, the transport layer, the session layer, and the presentationlayer.

In this way, the present embodiment carries out a disconnection sequencewith a single pair of packets, rather than a plurality of packets asrequired in conventional cases.

[B] No Response is Sent

FIG. 39( b) is a sequence diagram showing a disconnection sequenceaccording to the present embodiment (no response is sent). FIG. 39( c)is an illustration of the structure of communication data used in thedisconnection sequence of the present embodiment (response is sent).Note that in the present embodiment (no response is sent), the UAresponse (UA response in FIG. 39( c)) is not required.

As shown in FIG. 39( b), in the present embodiment (no response issent), when the connection is established without requiring a responsefrom the receiver, the DISC command alone can complete both search anddisconnection.

(3) Sequence in Transmitter and Sequence in Receiver

In FIGS. 40 to 56, for ease of explanation, the data link layer, thenetwork layer, the transport layer, and the session/presentation layermay be referred to as LAP, LAMP, TTP or SMP, and OBEX, respectively. Todistinguish between the communication layers in the transmitter andthose in the receiver, the layers in the transmitter are indicated by“P,” and those in the receiver by “S.” For example, “LAP(P)” denotes thedata link layer in the transmitter.

(3-1) Connection Sequence [A] Response is Sent

FIG. 40 is a sequence diagram showing a connection sequence of thepresent embodiment (response is sent). FIGS. 41( a), 41(b) areillustrations of the structure of communication data used in theconnection sequence of the present embodiment (response is sent).

As shown in FIG. 40, in the present embodiment (response is sent), thetransmitter and the receiver first carry out preparation for aconnection. Then, the transmitter passes on the request from the upperlayer to the lower layers, and then transmits the request as a singlepacket (SNRM). Meanwhile, the receiver receives the SNRM packet, andpasses on the notification of the successful establishment of aconnection to the upper layers, and then passes on a response from theOBEX(S) from the upper to the lower layer, and transmits the response asa single packet (UA). The transmitter is notified of the establishmentof the connection through the reception of UA, and passes on thenotification (Connect.confirm) from lower to upper layers.

The following will separately describe the sequence in the transmitterand the sequence in the receiver.

First, the communication layers in the transmitter will be described.

When a connection request is transmitted from the application to theOBEX(P), the OBEX(P) emits a connection request function (Primitive), inwhich data contains a connection request command to the lower layer(SMP(P)). Furthermore, when a connection confirmation function istransmitted from the SMP(P) to the OBEX(P), the OBEX(P) checks aresponse for an OBEX connection which is contained in the data. When theresponse tells that the connection has been properly done (“Success”),the OBEX(P) finishes the connecting operation.

The SMP(P) receives the connection request function from the OBEX(P),and adds a parameters required for communication with the SMP(S) of thereceiver to the data, and emits the connection request function to thelower layer (LMP(P)). When a connection confirmation function istransmitted from the LMP(P) to the SMP(P), the SMP(S) extracts aparameter generated by the SMP(S) of the receiver from the data of thefunction, and checks the value, and then finishes the negotiation withthe SMP(S). Further, the SMP(P) removes the parameter of the SMP(S) fromthe data of the connection confirmation function, and transmits theresulting data to the OBEX(P) as the connection confirmation function.

The LMP(P) receives the connection request function from the SMP(P), andimmediately adds parameter(s) required for communication with the LMP(S)of the receiver to the data of the connection request function from theSMP(P), and emits the connection request function to the lower layer(LAP(P)). When a connection confirmation function is transmitted fromthe LAP(P) to the LMP(P), the LMP(P) extracts parameter(s) generated bythe LMP(S) of the receiver from the data of the function, and checks thevalue, and then finishes the negotiation with the LMP(S). Further, theLMP(P) removes the parameter(s) of the LMP(S) from the data of theconnection confirmation function, and transmits the resulting data tothe SMP(P) as the connection confirmation function.

Note that, in general operation, an LSAP (Link Service Access Point) isdefined to manage the logic port. When the connection is established byconnecting the layers one by one, the LMP is not required. In this case,a connectionless value is used as the fixed value of the LSAP.Therefore, the exchange of the connection parameter(s) for LMP is notrequired.

The LAP(P) receives the connection request function from the LMP(P), andimmediately adds parameter(s) required for communication with the LAP(S)of the receiver to the data of connection request function from theLMP(P), and emits the SNRM command to the physical layer of thereceiver. When the UA response is transmitted from the physical layer ofthe receiver to the LAP(P), the LAP(P) extracts the parameter(s)generated by the LAP(S) of the receiver from the data of the UAresponse, and checks the value, and then finishes the negotiation withthe LAP(S). Further, the LAP(P) removes the parameter(s) of LAP(S) fromthe data of the UA response, and transmits the resulting data to theLMP(P) as the connection confirmation function.

Next, the communication layers in the receiver will be described.

The OBEX(S) receives the connection request function from theapplication, and stands by for the next reception. When a connectionnotification function (Indication) is transmitted from the lower layer(SMP(S)), the OBEX(S) checks a command for OBEX connection which iscontained in the data. When the command indicates that the connectionhas been properly done, the OBEX(S) emits a response “Success” as aconnection response function (Response) to the SMP(S), and finishes theconnection operation.

The SMP(S) receives the connection request function from the OBEX(S),and stands by for the next reception. When the connection notificationfunction is transmitted from the lower layer (SMP(S)), the SMP(S)extracts the parameter(s) generated by the SMP(P) of the transmitterfrom the data of the function, and creates parameter(s) for response,and emits the connection request function containing the data thuscreated by removing the parameter(s) of the SMP(P) from the data of thefunction, to the OBEX(S), and then stands by for a connection responsefunction which comes from the OBEX(S). Further, when the connectionresponse function is transmitted from the OBEX(S), the SMP(S) adds theparameter(s) of the response to the data of the connection responsefunction of the OBEX(S), emits the connection response function to theLMP(S), and finishes the negotiation for the SMP layer.

The LMP(S) receives the connection request function from the SMP(S), andstands by for the next reception. When the connection notificationfunction is transmitted from the lower layer (LAP(S)), the LMP(S)extracts the parameter(s) generated by the LMP(P) of the transmitterfrom the data of the function, and creates parameter(s) for response,and emits the connection request function containing the data thuscreated by removing the parameter(s) of the LMP(P) from the data of thefunction, to the SMP(S), and then stands by for a connection responsefunction which comes from the SMP(S). Further, when the connectionresponse function is transmitted from the SMP(S), the LMP(S) adds theparameter(s) of the response, to the data of connection responsefunction of the SMP(S), emits the connection response function to theLAP(S), and finishes the negotiation for the LMP layer.

Note that in general operation, an LSAP (Link Service Access Point) isdefined to manage the logic port. When the connection is established byconnecting the layers one by one, the LMP is not required. In this case,a connectionless value is used as the fixed value of the LSAP.Therefore, the exchange of connection parameter(s) for LMP is notrequired.

The LAP(S) receives the connection request function from the LMP(S), andstands by for the next reception. When the SNRM command is transmittedfrom the physical layer to the LAP(S), the LAP(S) extracts parameter(s)generated by the LAP(P) of the transmitter from the data of the SNRMcommand, and creates parameter(s) for response after transmitting theconnection request function, containing the data thus created byremoving the parameter(s) of LAP(P) from the data of the SNRM command,to the LMP(S), and then stands by for a connection response functionwhich comes from the LMP(S). Further, when the connection responsefunction is transmitted from the LMP(S), the LAP(S) adds theparameter(s) of the response to the data of the connection responsefunction of the LMP(S), emits the UA response to the physical layer, andfinishes the negotiation for the LAP layer.

[B] No Response is Sent

FIG. 42 is a sequence diagram showing a connection sequence according tothe present embodiment (no response is sent). FIG. 41( a) is anillustration of the structure of communication data used in theconnection sequence according to the present embodiment (no response issent).

As shown in FIG. 42, in the present embodiment (no response is sent),the transmitter and the receiver first carry out preparation for aconnection. Then, the transmitter passes on the request from the upperlayer to the lower layers, and then transmits the request as a singlepacket (SNRM). Having transmitted the SNRM packet, the transmitterpasses on the notification of completion of a connection(Connect.confirm) from the LAP(P) to the upper layers. Meanwhile, thereceiver receives the SNRM packet, and passes on the notification ofcompletion of a connection from the lower to the upper layer. Theconnection is regarded completed when the notification of completion ofa connection is received by the OBEX(S).

The following will describe the sequence in the transmitter and thesequence in the receiver.

First, the communication layers in the transmitter will be described.

When a connection request is transmitted from the application to theOBEX(P), the OBEX(P) immediately emits a connection request function(Primitive), in which data contains a connection request command, to thelower layer (SMP(P)). Further, when a connection confirmation functionis transmitted from the SMP(P) to the OBEX(P), the OBEX(P) finishes theconnecting operation.

The SMP(P) receives the connection request function from the OBEX(P),and immediately adds parameter(s) required for communication with theSMP(S) of the receiver to the data of the connection request function ofthe OBEX(P), and emits the connection request function to the lowerlayer (LMP(P)). When a connection confirmation function is transmittedfrom the LMP(P) to the SMP(P), the SMP(P) regards that the procedure hasbeen done with the transmitted parameter(s), and finishes thenegotiation for the SMP layer. Then, the SMP(P) transmits the connectionconfirmation function to the OBEX(P).

The LMP(P) receives the connection request function from the SMP(P), andimmediately adds parameters required for communication with the LMP(S)of the receiver to the data of the connection request function from theSMP(P), and emits the connection request function to the lower layer(LAP(P)). When a connection confirmation function is transmitted fromthe LAP(P) to the LMP(P), the LMP(P) regards that the procedure has beendone with the transmitted parameter(s), and finishes the negotiation forthe LMP layer. Then the LMP(P) transmits the connection confirmationfunction to the SMP(P).

Note that in general operation, an LSAP (Link Service Access Point) isdefined to manage the logic port. When the connection is established byconnecting the layers one by one, the LMP is not required. In this case,a connectionless value is used as the fixed value of LSAP. Therefore,the exchange of connection parameter(s) for LMP is not required.

The LAP(P) receives the connection request function from the LMP(P), andimmediately adds parameter(s) required for communication with the LAP(S)of the receiver to the data of the connection request function from theLMP(P), and emits the SNRM command to the physical layer of thereceiver. Transmitting the SNRM command, the LAP(P) regards that theprocedure has been done with the transmitted parameter(s), and finishesthe negotiation for the LAP layer. Then the LAP(P) transmits theconnection confirmation function to the LMP(P).

Next, the communication layers in the receiver will be described.

The OBEX(S) receives the connection request function from theapplication, and stands by for the next reception. When a connectionnotification function (Indication) is transmitted from the lower layer(SMP(S)) to the OBEX(S), the OBEX(S) checks a command for OBEXconnection which is contained in the data. When the command indicatesthat the connection has been properly done, the OBEX(S) finishes theconnecting operation.

The SMP(S) receives the connection request function from the OBEX(S),and stands by for the next reception. When the connection notificationfunction is transmitted from the lower layer (SMP(S)), the SMP(S)extracts parameter(s) generated by the SMP(P) of the transmitter fromthe data of the function, and finishes negotiation by using theparameter(s). Then the SMP(S) emits the connection request functioncontaining the data thus created by removing the parameter(s) of SMP(P)from the data of the function, to the OBEX(S).

The LMP(S) receives the connection request function from the SMP(S), andstands by for the next reception. When the connection notificationfunction is transmitted from the lower layer (LAP(S)), the LMP(S)extracts parameter(s) generated by the LMP(P) of the transmitter fromthe data of the function, and finishes negotiation by using theparameter(s). Then the LMP(S) emits connection request functioncontaining the data thus created by removing the parameter(s) of theLMP(P) from the data of the function, to the SMP(S).

Note that in general operation, an LSAP (Link Service Access Point) isdefined to manage the logic port. When the connection is established byconnecting the layers one by one, the LMP is not required. In this case,a connectionless value is used as the fixed value of the LSAP.Therefore, the exchange of connection parameter(s) for the LMP is notrequired.

The LAP(S) receives the connection request function from the LMP(S), andstands by for the next reception. When the SNRM command is transmittedfrom the physical layer, the LAP(S) extracts parameter(s) generated bythe LAP(P) of the transmitter from the data of the SNRM command, andfinishes negotiation by using the parameter(s). Then the LAP(S) emitsthe connection request function containing the data thus created byremoving the parameter(s) of LAP(P) from the data of the function, tothe LMP(S).

(3-2) Data Exchange Sequence [A] Response is Sent

FIG. 43 is a sequence diagram showing a data exchange sequence accordingto the present embodiment (response is sent). FIG. 44 is an illustrationof the structure of communication data used in the data exchangesequence of the present embodiment (response is sent).

As shown in FIG. 43, in the present embodiment (response is sent), thetransmitter generates a PUT command, which is propagated through thelower layers to be transmitted as a UI frame (FIG. 37( b)).

Obtaining the data, the receiver propagates a notification from lower toupper layers. At this time, the SMP(S) notifies the upper layer OBEX(S)of continuity of data (status=truncated).

After transmitting a predetermined number of packets, the transmittertransmits a packet in which the flag for confirming proper datatransmission is on. The receiver receives the data with the flag on, andchecks if the transmission has been done properly. If an error isdetected, the SMP(S) informs the transmitter of the packet number whichhas not been received due to the error.

if no error is detected, the transmitter outputs the next packets. If anerror is detected, the transmitter retransmits the packets having beensuspended after the error.

The transmitter puts an ON-flag in the final data, the flag indicatingthat this is the final data. Meanwhile, the SMP(S) notifies the OBEX(S)that all data items have been received (status=OK), and stands by for aresponse from the OBEX(S). The response generated from the OBEX(S) ispropagated to the lower layers, and is outputted as a UI frame.

If the response is “Success,” the transmitter finishes the operation ina general way.

The following will separately describe the sequence in the transmitterand the sequence in the receiver.

In the transmitter, the OBEX(P) outputs a PUT command to the lowerlayers as a data transmission function. However, if the SMP(P) iscapable of transmission without a response (“Continue” in general) withrespect to a PUT command, except for the PUT Final (final PUT), theOBEX(P) outputs the next command. In the case of a command other thanthe PUT Final or the PUT command, the operation is suspended to wait forthe data notification function from the lower layer, and the command isfinished after checking the response in the data.

The data transmission function denotes a function (Data Request) forrequesting the lower layer to transmit data. Further, the datanotification function denotes a function (Data Indicate) serving as anotification of data reception from the lower layer.

In the receiver, the OBEX(S) receives data from the lower layer with thedata notification function. However, the OBEX(S) does not send back aresponse to PUT commands other than the PUT Final command, and sendsback, as a response, a data transmission function to commands other thanthe PUT Final command or PUT command.

The following will describe a header, etc. of the data transmissionfunctions and the data notification functions in the upper and lowerlayers. These data items are used for both the transmitter and thereceiver.

In receiving the data transmission function from the OBEX, (a) if thepredetermined size for transmission data in the LMP is smaller than thesize of data in the data transmission function, the SMP divides the datainto smaller items to allow the LMP to transmit the data. On the otherhand, (b) if the predetermined size for transmission data in the LMP islarger than the size of data in the data transmission function, the SMPcombines plural data items of the data transmission function to makedata having a larger volume but being transmittable. The SMP alsocreates a SMP header constituted of, for example, a sequential number,an argument for asking the other device about data reception condition,an argument indicating the end of data, an argument indicating necessityof transmission of OBEX response to the SMP of the other device, and anargument indicating whether the received data was a complete set of dataitems. Further, the SMP header is added to the divided/combined data andis contained in the data transmission function. The data transmissionfunction is transmitted to the LMP.

When the SMP receives the data notification function from the LMP, theSMP extracts the SMP header from the data in the function, and checkswhether the sequential numbers are appropriate (i.e., the numbers are insequence). If the numbers are in sequence, the SMP transmits the datanotification function to the OBEX. At this point, the data notificationfunction may be outputted for each data notification function comingfrom the lower layer, or for a predetermined set of those.

The SMP(P) of the transmitter modifies the data transmission functionfrom the OBEX(P), into a data transmission function suitable for theLMP(P), and emits the data transmission function with a predeterminedamount of data. After that, the SMP(P) sets “true” for the argument forasking the receiver about data reception condition, and transmits thedata transmission function. The SMP(P) then stands by for the datanotification function from the LMP(P).

The SMP(P) analyzes the SMP header in the data notification functionsent from the LMP(S), and confirms if the transmission has been doneproperly, by referring to the argument indicating whether the receiveddata was a complete set of data items. Having been confirmed that thetransmission has been done properly, the SMP is turned into a stateallowing transmission to the OBEX(P), that is, it is ready to send thenext data. In this state, the SMP(P) is capable of receiving data fromthe OBEX(P).

On the other hand, when the SMP(P) has found out, according to theargument indicating whether the received data was a complete set of dataitems, that the transmission has not been done properly, the SMP(P)regenerates data sequence from the unsent data transmission function tothe argument set to “true” for asking the receiver about data receptioncondition. The SMP(P) repeats the regeneration predetermined times, oruntil the all data of the data transmission function is received in thereceiver.

Further, when the SMP(P) receives from OBEX(P) the data transmissionfunction with an argument indicating the end of data, which is set to“true,” the SMP(P) sets “true” for the argument indicating the end ofdata, or for the argument indicating necessity of response from OBEX(S)in the data of transmission function to the LMP(P), and sends this newtransmission function to the LMP(P).

On the other hand, when the SMP(S) of the receiver receives from theLMP(S) the data notification function in which either the argumentindicating the end of data or the argument indicating necessity oftransmission of OBEX(S) response to the other end is set to “true,” theSMP(S) removes the header of the SMP(S) from the data notificationfunction before transmitting the function to the OBEX(S).

Further, when the SMP(S) receives the data notification function fromthe LMP(S), the SMP(S) analyzes the SMP header in the data in the datanotification function, and checks the sequential number. If the SMP(S)confirms that the receiver has received all data items until the headerin which the argument for asking the receiver about data receptioncondition is “true,” the SMP(S) creates a SMP header by modifying theargument indicating whether the received data was a complete set of dataitems into an appropriate format for indicating that the received datawas a complete set of data items. With this data, the SMP(S) transmitsthe data transmission function to the LMP(S).

On the other hand, when the SMP(S) found out that there was a problem indata reception in the receiver, the SMP(S) infers the number of SMPheader not transmitted and stores the number. For example, when the dataitems 0, 1, 2, 3, 5 are received, obviously the fifth number should be“4,” but “4” is missing. That is, the number of data not received is“4.” After this, the SMP(S) only checks if the argument for asking thereceiver about data reception condition is set to “true” in the SMPheader, and stops output of the data notification function to theOBEX(S).

When the SMP(S) receives the data notification function in which theargument for asking the receiver about data reception condition is“true,” the SMP(S) creates a SMP header by modifying the argumentindicating whether the received data was a complete set of data itemsinto an appropriate format for indicating that the received data was nota complete set of data items, and inserting the number of the SMP headernot properly received into the field for the sequential number. Withthis data, the SMP(S) transmits the data transmission function to theLMP(S).

Further, when the SMP(S) receives the data notification function inwhich either the argument indicating the end of data or an argumentindicating necessity of transmission of OBEX(S) response to the otherend is “true,” the SMP(S) transmits the data notification function tothe OBEX(S), and stands by for a data transmission request from theOBEX(S).

When the SMP(S) receives a data transmission request from the OBEX(S),the SMP(S) creates a SMP header by modifying argument indicating whetherthe received data was a complete set of data items into an appropriateformat for indicating that the received data was a complete set of dataitems. The SMP(S) adds the SMP header to the data transmission functionfrom the OBEX(S), and sends the resulting data to the LMP(S). Note that,since the notification to the OBEX(S) stops in case of error, the SMP(S)stands by only when the transmission is properly completed.

When the LMP receives the data transmission request function from theupper layer, the LMP adds a LMP header to the data of the datatransmission request function, and adds the data to the datatransmission function, and transmits the function to the LAP. Further,when the LMP receives the data notification function from the LAP, theLMP removes the LMP header from the data of the function and providesthe resulting data in the data notification function, and transmits thefunction to the SMP.

Note that, when the connection is established by connecting the layersone by one, the LMP is not required. In this case, the LMP headerincludes LSAP having a connectionless value.

When the LAP receives the data transmission request function from theLMP, the LAP adds a LAP header to the data of the data transmissionrequest function, and incorporates this data into a UI frame, andtransmits the UI frame to the physical layer. Further, when the LAPreceives the data reception notification from the physical layer, theLAP removes the LAP header from the data of the UI frame andincorporates the resulting data into the data notification function, andtransmits the function to the LMP. Note that in the present embodiment,the LAP header contains a connection address and a UI indicator.

[B] No Response is Sent

FIG. 45 is a sequence diagram showing a data exchange sequence accordingto the present embodiment (no response is sent). FIG. 44 is anillustration of the structure of communication data used in the dataexchange sequence according to the present embodiment (no response issent).

As shown in FIG. 45, in the present embodiment (no response is sent),the transmitter generates a PUT command, and the PUT command ispropagated through the lower layers, and is outputted as a UI frame.

Obtaining the data, the receiver propagates a notification from lower toupper layers. At this time, the SMP(S) notifies the upper layer OBEX(S)of continuity of data (status=truncated).

The transmitter puts an ON-flag in the final data, the flag indicatingthat this is the final data. Meanwhile, the receiver confirms theON-flag of the SMP(S), and notifies the OBEX(S) that all data items havebeen received (status=OK), and then finishes data exchange sequence.

The following will separately describe the sequence in the transmitterand the sequence in the receiver.

In the transmitter, the OBEX(P) outputs a PUT command to the lowerlayers as a data transmission function. However, the OBEX(P) is capableof finishing a command without a response with respect to each command.Then, the OBEX(P) outputs the next command if transmission is allowed inthe SMP(P).

In the receiver, the OBEX(S) receives the data notification functionfrom the lower layer. However, the OBEX(S) does not send back a responsefor each command, only receiving data.

The following will describe a header, etc. of the data transmissionfunctions and the data notification functions in the upper and lowerlayers. These data items are used for both the transmitter and thereceiver.

In receiving the data transmission function from the OBEX, (a) if thepredetermined size for transmission data in the LMP is smaller than thesize of data in the data transmission function, the SMP divides the datainto smaller items to allow the LMP to transmit the data. On the otherhand, (b) if the predetermined size for transmission data in the LMP islarger than the size of data in the data transmission function, the SMPcombines plural data items of the data transmission function to makedata having a larger volume but being transmittable. The SMP alsocreates a SMP header constituted of, for example, a sequential number,an argument for asking the other device about data reception condition,an argument indicating the end of data, an argument indicating necessityof transmission of OBEX response to the SMP of the other device, and anargument indicating whether the received data was a complete set of dataitems. Further, the SMP header is added to the divided/combined data andis contained in the data transmission function. The data transmissionfunction is transmitted to the LMP.

When the SMP receives the data notification function from the LMP, theSMP extracts the SMP header from the data in the function, and checkswhether the sequential numbers are appropriate (i.e., the numbers are insequence). If the numbers are in sequence, the SMP transmits the datanotification function to the OBEX. At this time, the data notificationfunction may be outputted for each data notification function comingfrom the lower layer, or for a predetermined set of those.

The SMP(P) of the transmitter modifies the data transmission functionfrom OBEX(P), into a data transmission function suitable for the LMP(P).When the SMP(P) receives from the OBEX(P) a data transmission functionin which the argument for asking the receiver about data receptioncondition is set to “false,” the SMP(P) adds the SMP header to the data,and transmits the data to the LMP(P). On the other hand, when the SMP(P)of the receiver receives from the OBEX(P) a data transmission functionin which the argument indicating the end of data is set to “true,” theSMP(P) sets “true” for the argument indicating the end of data, or forthe argument indicating necessity of transmission of OBEX(S) response inthe transmission function to the LMP(P), and sends this new transmissionfunction to the LMP(S).

Further, when the SMP(S) receives the data notification function fromthe lower layer, the SMP(S) analyzes the SMP header in the data in thedata notification function, and checks the sequential number. If theSMP(S) confirms that the reception has been done normally, the SMP(S)transmits the data transmission function to the LMP(S).

On the other hand, when the SMP(S) found out that there was a problem indata reception in the receiver, the SMP(S) notifies the OBEX(S) of theerror. For example, when the data items 0, 1, 2, 3, 5 are received,obviously the fifth number should be “4,” but “4” is missing.

After that, the SMP(S) stands by for a function with a SMP header inwhich the argument indicating the end of data or the argument indicatingnecessity of transmission of OBEX(S) response to the receiver and is setto “true.” The SMP(S) stops data notification to the OBEX(S) until itreceives either the “true” data notification function (however nonotification is sent to the OBEX(S)), receives a disconnectionnotification function, or does not carry out the data notification tothe OBEX(S) until a certain time period has been elapsed.

When the LMP(P) of the transmitter receives a data transmission requestfunction from the SMP(S), the LMP(P) adds the LMP header to the data ofthe function. The LMP(P) then transmits the data transmission requestfunction containing the created data to the LAP(P).

When the LMP(S) of the receiver receives the data notification functionfrom the LAP(S), the LMP(S) removes the LMP header from the data of thedata notification function, and provides the data to the datanotification function, and transmits the function to the SMP(S).

Note that when the connection is established by connecting the layersone by one, the LMP is not required. In this case, a connectionlessvalue is used as the fixed value of LSAP in the LMP header.

When the LAP(P) of the transmitter receives the data transmissionrequest function from the LMP(P), the LAP(P) adds a LAP header to thedata of the data transmission request function, and incorporates thisdata into a UI frame, and transmits the UI frame to the physical layer.

Further, when the LAP(S) of the receiver receives the data receptionnotification from the physical layer, the LAP(S) removes the LAP headerfrom the data of the UI frame and incorporates the resulting data intothe data notification function, and transmits the function to theLMP(S). Note that, in the present embodiment, the LAP header contains aconnection address and a UI indicator.

(3-3) Disconnection Sequence [A] Response is Sent

FIG. 46 is a sequence diagram showing a disconnection sequence accordingto the present embodiment (response is sent). FIGS. 47( a), 47(b) areillustrations of the structure of communication data used in thedisconnection sequence of the present embodiment (response is sent).

As shown in FIG. 46, in the present embodiment (response is sent), thedisconnection command of the transmitter is propagated from upper tolower layers, and a DISC command is generated. Meanwhile, the receiverreceives the DISC command, and passes on the command from lower to upperlayers, and then passes on a response from upper to lower layers, and aUA response is generated. The notification of reception of the UAresponse is passed on from lower to upper layers of the transmitter, andthe sequence is completed.

The following will separately describe the sequence in the transmitterand the sequence in the receiver.

First, the communication layers in the transmitter will be described.

When a disconnection request is transmitted from the application to theOBEX(P), the OBEX(P) immediately emits a disconnection request function(Primitive), which contains a disconnection request command, to thelower layer (SMP(P)). Further, when a disconnection confirmationfunction is transmitted from the SMP(P) to the OBEX(P), the OBEX(P)checks a response for OBEX disconnection which is contained in the data.When the response tells that the disconnection has been properly done(“Success”), the OBEX(P) finishes the disconnecting operation.

The SMP(P) receives the disconnection request function from the OBEX(P),and immediately adds parameter(s) required for communication with theSMP(S) of the receiver to the data, and emits the disconnection requestfunction to the lower layer (LMP(P)). When a disconnection confirmationfunction is transmitted from LMP(P) to the SMP(P), the SMP(P) extractsparameter(s) generated by the SMP(S) of the receiver from the data ofthe function, and checks the value, and then finishes the disconnectionprocess with the SMP(S). Further, the SMP(P) removes the parameter(s) ofthe SMP(S) from the data of the disconnection confirmation function, andtransmits the resulting data to the OBEX(P) as the disconnectionconfirmation function. It however should be noted that there is normallyno parameter to be added to the disconnection request function in theSMP(P).

The LMP(P) receives the disconnection request function from the SMP(P),and immediately adds parameter(s) required for communication with theLMP(S) of the receiver to the data of the disconnection request functionfrom the SMP(P), and emits the disconnection request function to thelower layer (LAP(P)). When a disconnection confirmation function istransmitted from the LAP(P) to the LMP(P), the LMP(P) extractsparameter(s) generated by the LMP(S) of the receiver from the data ofthe function, and checks the value, and then finishes the disconnectingoperation with the LMP(S). Further, the LMP(P) removes the parameter(s)of the LMP(S) from the data of the disconnection confirmation function,and transmits the resulting data to the SMP(P) as the disconnectionconfirmation function. It however should be noted that there is normallyno parameter to be added to the disconnection request function in theLMP(P).

The LAP(P) receives the disconnection request function from the LMP(P),and immediately adds parameter(s) required for communication with theLAP(S) of the receiver to the data of the disconnection request functionform the LMP(P), and emits the DISC command to the physical layer of thereceiver. When the UA response is transmitted from the physical layer ofthe receiver to the LAP(P), the LAP(P) extracts parameter(s) generatedby the LAP(S) of the receiver from the data of the UA response, andchecks the value, and then disconnects from the LAP(S). Further, theLAP(P) removes the parameter(s) of LAP(S) from the data of the UAresponse, and transmits the resulting data to the LMP(P) as thedisconnection confirmation function. It however should be noted thatthere is normally no parameter to be added to the disconnection requestfunction in the LAP(P).

Next, the communication layers in the receiver will be described.

When a disconnection notification function (Indication) is transmittedfrom the lower layer (SMP(S)), the OBEX(S) checks a command for OBEXdisconnection which is contained in the data. When the command indicatesthat the disconnection has been properly done, the OBEX(S) emits aresponse called “Success” as a disconnection response function to theSMP(S), and finishes the disconnecting operation.

When the disconnection notification function is transmitted from thelower layer (SMP(S)), the SMP(S) extracts parameter(s) generated by theSMP(P) of the transmitter from the data of the function, and createsparameter(s) for response, and emits the disconnection request functioncontaining the data thus created by removing the parameter(s) of theSMP(P) from the data of the function, to the OBEX(S), and then stands byfor a disconnection response function which comes from the OBEX(S).Further, when the disconnection response function is transmitted fromthe OBEX(S), the SMP(S) adds the parameter(s) of the response to thedata of the disconnection response function of the OBEX(S), emits thedisconnection response function to the LMP(S), and finishes thedisconnection in the SMP layer. It however should be noted that there isnormally no parameter to be added to the disconnection request functionin the SMP(S).

When the disconnection notification function is transmitted from thelower layer (LAP(S)), the LMP(S) extracts parameter(s) generated by theLMP(P) of the transmitter from the data of the function, and createsparameter(s) for response, and emits the disconnection request functioncontaining the data thus created by removing the parameter(s) of theLMP(P) from the data of the function, to the SMP(S), and then stands byfor a disconnection response function which comes from the SMP(S).Further, when the disconnection response function is transmitted fromthe SMP(S), the LMP(S) adds the parameter(s) of the response to the dataof the disconnection response function of the SMP(S), emits thedisconnection response function to the LAP(S), and finishes thedisconnection in the LMP layer. It however should be noted that there isnormally no parameter to be added to the disconnection request functionin the LMP(S).

When the DISC command is transmitted from the physical layer, the LAP(S)extracts parameter(s) generated by the LAP(P) of the transmitter fromthe data of the DISC command, and creates parameter(s) for responseafter transmitting the disconnection request function, containing thedata thus created by removing the parameter(s) of LAP(P) from the dataof the DISC command, to the LMP(S), and then stands by for adisconnection response function which comes from the LMP(S). Further,when the disconnection response function is transmitted from the LMP(S),the LAP(S) adds the parameter(s) of the response to the data of thedisconnection response function of the LMP(S), emits the UA response tothe physical layer, and finishes the disconnection process in the LAPlayer. It however should be noted that there is normally no parameter tobe added to the disconnection request function in the LAP(S).

[B] No Response is Sent

FIG. 48 is a sequence diagram showing a disconnection sequence accordingto the present embodiment (no response is sent). FIG. 47( a) is anillustration of the structure of communication data used in thedisconnection sequence of the present embodiment (no response is sent).

As shown in FIG. 48, in the present embodiment (no response is sent),the disconnection command of the transmitter is propagated from upper tolower layers, and a DISC command is generated. In the transmitter, thedisconnection operation is completed at this point. Meanwhile, thereceiver receives the DISC command, and passes on the DISC command fromlower to upper layers. When the DISC command is passed onto the OBEXlayer, the disconnection sequence is completed.

The following will describe the sequence in the transmitter and thesequence in the receiver.

First, the communication layers in the transmitter will be described.

When a disconnection request is transmitted from the application to theOBEX(P), the OBEX(P) immediately emits a disconnection request function(Primitive), which contains a disconnection request command, to thelower layer (SMP(P)). Further, when a disconnection confirmationfunction is transmitted from SMP(P) to the OBEX(P), the OBEX(P) finishesthe disconnecting operation.

The SMP(P) receives the disconnection request function from the OBEX(P),and immediately adds parameter(s) required for communication with theSMP(S) of the receiver to the data of the disconnection request functionfrom the OBEX(P), and emits the disconnection request function to thelower layer (LMP(P)). When a disconnection confirmation function istransmitted from the LMP(P) to the SMP(P), the SMP(P) regards thedisconnection as being completed with the transmitted parameter(s) andfinishes the disconnection in the SMP layer. Further, the SMP(P)transmits the disconnection confirmation function to the OBEX(P). Ithowever should be noted that there is normally no parameter to be addedto the disconnection request function in the SMP(P).

The LMP(P) receives the disconnection request function from the SMP(P),and immediately adds parameter(s) required for communication with theLMP(S) of the receiver to the data of the disconnection request functionfrom the SMP(P), and emits the disconnection request function to thelower layer (LAP(P)). When a disconnection confirmation function istransmitted from the LAP(P) to the LMP(P), the LMP(P) regards thedisconnection as being completed with the transmitted parameter(s) andfinishes the disconnection in the LMP layer. Further, the LMP(P)transmits the disconnection confirmation function to the SMP(P). Ithowever should be noted that there is normally no parameter to be addedto the disconnection request function in the LMP(P).

The LAP(P) receives the disconnection request function from the LMP(P)and immediately adds parameter(s) required for communication with theLAP(S) of the receiver to the data of the disconnection request functionfrom the LMP(P), and emits the DISC command to the physical layer of thereceiver. When a DISC command is outputted, the LAP(P) regards thedisconnection as being completed with the transmitted parameter(s) andfinishes the disconnection process in the LAP layer. Further, the LAP(P)transmits the disconnection confirmation function to the LMP(P). Ithowever should be noted that there is normally no parameter to be addedto the disconnection request function in the LAP(P).

Next, the communication layers in the receiver will be described.

When a disconnection notification function (Indication) is transmittedfrom the lower layer (SMP(S)), the OBEX(S) checks a command for OBEXdisconnection which is contained in the data. When the command indicatesthat the disconnection has been properly done, the OBEX(S) finishes thedisconnecting operation.

When the disconnection notification function is transmitted from thelower layer (SMP(S)), the SMP(S) extracts parameter(s) generated by theSMP(P) of the transmitter from the data of the function, and completesthe disconnection with the parameter(s). Further, the SMP(S) removes theSMP(P) parameter(s) from the data of the disconnection notificationfunction, incorporates the resulting data into a disconnection requestfunction, and sends it to the OBEX(S). It however should be noted thatthere is normally no parameter to be added to the disconnect requestfunction in the SMP(S).

When the disconnection notification function is transmitted from thelower layer (LAP(S)), the LMP(S) extracts parameter(s) generated by theLMP(P) of the transmitter from the data of the function, and finishesthe disconnection with the parameter(s). Further, the LMP(S) removes theparameter(s) of LMP(P) from the data of the function, incorporating thedata into a disconnection request function, and sends it the SMP(S). Ithowever should be noted that there is normally no parameter to be addedto the disconnection request function in the LMP(S).

When the DISC command is transmitted from the physical layer, the LAP(S)extracts parameter(s) generated by the LAP(P) of the transmitter fromthe data of the DISC command, and completes disconnection with theparameter(s). Further, the LAP(S) removes the parameter(s) of LAP(P)from the data of the DISC command, and incorporates the resulting datato the disconnection request function and then emits the function to theLMP(S). It however should be noted that there is normally no parameterto be added to the disconnection request function in the LAP(S).

(4) Selection as to Whether or Not a Response is to Be Sent

With reference to FIGS. 49 to 56, the following will describe a flow ofdata and parameter(s) between the communication layers in thetransmitter and the receiver.

In the present embodiment, the communication layers LAP, LMP, SMP, OBEXin the transmitter and the receiver each have a connection requestfunction, a connection notification function, a connection responsefunction, and a connection confirmation function. These functions areused for access to the LAP layer from the upper layer (i.e., LMP layer).

For the functions, Data (hereinafter, referred to simply as data),Requested-QoS, or Returned-QoS may be specify as arguments. As mentionedearlier, the data is set up in each communication layer.

Meanwhile, QoS notifies the upper layer, including OBEX, of thenegotiation parameter(s), such as the baud rate determined in the LAP,and a result of negotiation. Note that conventional IrDA schemes alsouse QoS.

For example, when the application or the OBEX(P) of the transmitteremits a QoS having a parameter indicating that a response is required oris not required, it is propagated through the lower layers and reachesthe LAP(P). Then, the LAP(P) uses the value of the QoS as the value ofthe negotiation parameter(s) (Ack Less Connect), and transmits theparameter(s) to the receiver.

Consequently, the communication layers of the transmitter and those ofthe receiver are operated depending on whether or not the application orthe OBEX(P) of the transmitter requires a response, thereby enablingconnection both in a two-way manner and in a one-way manner.

FIGS. 49 to 53 are illustrations of a flow of data and parameter(s)between the communication layers in the connection sequence (FIG. 40)according to the present embodiment (response is sent). Note that theQoS parameter(s) between OBEX-SMP, between SMP-LMP, between LMP-LAP maybe identical or different. They are identified by the added symbols -a,-b, and -c in the figures.

In the transmitter, as shown in FIG. 49, the data to be transmitted tothe receiver and the data of QoS-1 (QoS requested by the transmitter)are propagated through upper to lower layers by con.req(data) (FIG. 40).

Meanwhile, in the receiver, as shown in FIG. 50, only the data of QoS-2(QoS requested by the receiver) is propagated through upper to lowerlayers by the con.req.

Thereafter, in the receiver, the QoS-1 of the transmitter and the QoS-2of the receiver are compared at the time of receiving the SNRM commandin the LAP(S), thereby creating common negotiation parameter(s) QoS-3.Then, as shown in FIG. 51, the LAP(S) passes on the QoS-3 and the datafrom the transmitter to the upper layers by con.ind(data). The upperlayers each store the QoS-3 and hold it as connection parameter(s) toestablish a connection.

In the receiver, QoS is not required in propagation of con.resp(data).Therefore, as shown in FIG. 52, only data is propagated from upper tolower layers by the con.resp(data). Then, when the LAP(S) receives thecon.resp(data), the QoS-3 is incorporated into the UA response, and theUA response is transmitted.

In the transmitter, the LAP(P) receives the UA response and stores theQoS-3 as negotiation parameter(s). Then, as shown in FIG. 53, the LAP(P)passes on the QoS-3 and the data from the receiver to the upper layersby con.conf(data). The communication layers each store the QoS-3 andhold it as connection parameter(s) to establish a connection.

In the present embodiment, as a QoS of con.req, for example,“Requested-QoS:Baud-Rate+Max-Turn-Around-Time+Disconnect-Threshold+DataSize+Ack lessconnection+Min-Packet-Interval” is used. Further, as a QoS ofCon.ind,con.conf, “Resultant-QoS:Baud-Rate+Disconnect-Threshold+DataSize+Ack less connection (indicationprimitive only)” is used.

The following will describe a flow of data and parameter(s) between thecommunication layers in the connection sequence (FIG. 42) according tothe present embodiment (no response is sent).

In the transmitter, as shown in FIG. 49, the data to be transmitted tothe receiver and the data of QoS-1 (QoS requested by the transmitter)are propagated through upper to lower layers by con.req(data) (FIG. 42).

Then, the LAP(P) of the transmitter stores the QoS-1 as QoS-3. Further,as shown in FIG. 53, the LAP(P) passes on the QoS-3 to the upper layersby con.conf. The communication layers each store the QoS-3 and hold itas connection parameter(s) for the established connection.

Meanwhile, in the receiver, only data of QoS-2 (QoS requested by thereceiver) is propagated from upper to lower layers by the con.req, asshown in FIG. 50.

Thereafter, in the receiver, the QoS-1 of the transmitter is determinedas QoS-3 at the time of receiving a SNRM command in the LAP(S). Notethat when the combination of the parameter(s) of QoS-2 and the QoS-1 isnot adequate, the SNRM command cannot be received.

Then, as shown in FIG. 51, the LAP(S) passes on the QoS-3 and the datafrom the transmitter, to the upper layers by con.ind(data). The upperlayers each store the QoS-3 and hold it as connection parameter(s) toestablish a connection.

In this manner, QoS-1 and QoS-2 are controlled by the application in theupper layer (application), thereby selecting whether or not a responseis to be sent.

The selection as to whether or not a response is to be sent is carriedout according to, e.g., a file type of the file to be transmitted,application, and a user selection.

Specifically, for example, consider a case where the selection iscarried out according to a type of file. In the case ofmultimedia-related file, it is possible to select whether or not aresponse is to be sent. In the case of data that the user would like toconfirm its reception such as a file of a telephone book, email,schedule, it is automatically selected that a response is to be sent.Further, consider a case where the selection is carried out according toapplication. In the case of a slide show, it is automatically selectedthat no response is to be sent, for example. Further, consider a casewhere the selection is carried out according to user selection. In thiscase, the user selects, from a displayed menu, whether or not a responseis to be sent, for example.

FIGS. 54 through 56 are illustrations showing alternative flows of dataand parameter(s) between the communication layers in a connectionsequence according to the present embodiment.

In the transmitter, when the first SNRM command includes information ofall the communication layers (FIG. 40), the data and parameter(s) may bedirectly transmitted to the LAP layer from each communication layer,instead of relaying those from one communication layer to the other(FIG. 49). This direct transmission to the LAP layer is shown in FIG.54.

On the other hand, as shown in FIG. 55, the receiver may be arranged sothat all of the data and the parameter(s) contained in the SNRM commandare extracted, and are transmitted directly from the LAP layer to therespective corresponding communication layers.

Further, as shown in FIG. 56, the transmitter may be arranged so thatthe data and parameter(s) for the OBEX(P), the SMP(P), and the LMP(P)are unified in the LMP(P), and the parameter(s) of the LAP(P) is addedto the unified data and parameter(s) in the LAP(P), thereby generating aSNRM command.

Each communication procedure (communication method, protocol) describedin the above embodiments of the present invention may be realized bysoftware. Each communication procedure may be a program executable by acomputer. The present invention may be a computer-readable storagemedium in which the program is stored. Examples of the storage mediuminclude CDs, DVDs, memories, and hard discs.

In order to solve the foregoing problems, a wireless communicationdevice serving as a transmitter/receiver of the present invention may bea wireless communication device which transmits a predetermined amountof transfer data using an infrared ray, including a transmission controlsection for transmitting an SNRM command to the other station withouttransmitting a station-search command (XID) to search the other station,the SNRM command including connection parameters such as maximumtransferable speed and maximum receivable data length of the wirelesscommunication device.

In order to solve the foregoing problems, another wireless communicationdevice serving as a transmitter/receiver of the present invention may bea wireless communication device which receives a predetermined amount oftransfer data using an infrared ray, including a reception controlsection for transmitting a UA response including connection parameterssuch as maximum transferable speed and maximum receivable data length ofthe wireless communication device, the UA response being transmittedwhen a first command from the transmitter is an SNRM command includingparameters such as maximum transferable speed and maximum receivabledata length of the transmitter.

The wireless communication device may be arranged so as to include asetting section for assigning a predetermined unused code (0xFFFFFFFF)to the other station's address (Destination Device Address) field of anSNRM command.

The wireless communication device may be arranged so that the deviceincludes an identification section for identifying whether the unusedcode (0xFFFFFFFF) is assigned to the other station's address(Destination Device Address) field of the received SNRM command or not,and the reception control section immediately transmits the UA responseonly when the unused code (0xFFFFFFFF) is assigned to the otherstation's address (Destination Device Address) field.

The wireless communication device may be arranged so that an SNRMcommand includes an area in which upper layer user data is put, and thetransmission control section transmits the upper layer user data as wellas the connection parameters. In the wireless communication device, auser data identifier and a user data length may be positioned before theupper layer user data.

In the wireless communication device, the upper layer user data mayinclude a CONNECT command in OBEX.

The wireless communication device may be arranged so that a UA responseincludes an area in which upper layer user data is put, and thereception control section transmits the upper layer user data as well asthe connection parameters. In the wireless communication device, a userdata identifier and a user data length may be positioned before theupper layer user data.

In the wireless communication device, the upper layer user data mayinclude a SUCCESS response in OBEX.

In order to solve the foregoing problems, further another wirelesscommunication device serving as a transmitter/receiver of the presentinvention may be a wireless communication device which transmits apredetermined amount of transfer data using an infrared ray to thereceiver, a DISC command in particular including an area to which upperlayer user data is put, and the wireless communication device includinga transmission control section for transmitting user data from an upperlayer. In the wireless communication device, a user data identifier anda user data length may be positioned before the upper layer user data.

In the wireless communication device, the user data from the upper layermay include a DISCONNECT in OBEX.

In order to solve the foregoing problems, further another wirelesscommunication device serving as a transmitter/receiver of the presentinvention may be a wireless communication device which transmits apredetermined amount of transfer data using an infrared ray to thereceiver, wherein when a UA response is received after an SNRM commandis transmitted and the UA response does not include user data from anupper layer, the wireless communication device regards the connection asan error, and does not enter a data transfer mode. In the wirelesscommunication device, the user data from the upper layer may be aSUCCESS response in OBEX.

In order to solve the foregoing problems, further another wirelesscommunication device serving as a transmitter/receiver of the presentinvention may be a wireless communication device which transmits apredetermined amount of transfer data using an infrared ray to thereceiver, including a transmission control section for, when receiving aDISC command, transmitting upper layer user data by providing a UAresponse with an area for including the upper layer user data. In thewireless communication device, the upper layer user data may include aSUCCESS response in OBEX. In the wireless communication device, a userdata identifier and a user data length may be positioned before theupper layer user data.

In order to solve the foregoing problems, further another wirelesscommunication device serving as a transmitter/receiver of the presentinvention may be a wireless communication device which transmits apredetermined amount of transfer data using an infrared ray to thereceiver, wherein when a UA response is received after a DISC command istransmitted and the UA response does not include upper layer user data,the wireless communication device regards the connection as an error,and carries out a subsequent process accordingly. In the wirelesscommunication device, the upper layer user data may be a SUCCESSresponse in OBEX.

In order to solve the foregoing problems, further another wirelesscommunication device serving as a transmitter/receiver of the presentinvention may be a wireless communication device which transmits apredetermined amount of transfer data using an infrared ray to thereceiver, including a transmission control section for, when receivingan SNRM command, transmits upper layer user data by providing a DMresponse with an area for including the upper layer user data. In thewireless communication device, the upper layer user data may include anInternal Server Error response in OBEX. In the wireless communicationdevice, a user data identifier and a user data length may be positionedbefore the upper layer user data.

It is preferable to arrange the wireless communication device so that aconnection or a disconnection of all layers (from lower layers to upperlayers) is carried out by only one exchange of packets.

The wireless communication device may be arranged so that, when thetransmission control section does not receive a UA response from theother station after a predetermined time has passed since transmissionof the SNRM command, the transmission control section transmits an XIDcommand.

The wireless communication device may be arranged so that, when thedevice receives an XID response to the XID command, the device transmitsan XID-END command, and then transmits an SNRM command in IrDA, andenters a connection process in IrDA.

The wireless communication device may be arranged so that, when thedevice does not receive an XID response after a predetermined time haspassed since transmission of the XID command, the device transmits anXID-END command, and after a predetermined time, the device transmitsthe SNRM command again.

The wireless communication device may be arranged so that, when thedevice receives an XID command as a first command, the device stores thereception of the XID command, and thereafter, when the device does notreceive an SNRM command but receives again an XID command which is notan XID-END command, the device transmits an XID response in accordancewith a rule defined by IrDA.

The wireless communication device may be arranged so that, when thedevice receives an XID command as a first command, the device storesreception of the XID command, and when the device receives an SNRMcommand without transmitting an XID response, the device transmits theUA response.

The wireless communication device may be arranged so that, when thedevice receives an XID command as a first command, the device confirmsthe number in a Discovery Flag area of the XID command, and thereafter,when the XID slot indicates one of 6, 8, and 16, the device transmits anXID response in accordance with a rule defined by IrDA.

The wireless communication device may be arranged so that an SNRMcommand in particular includes a flag indicating whether a communicationdirection is one-way or two-way, and the flag as well as the connectionparameters are transmitted.

The wireless communication device may be arranged so that, aftertransmitting an SNRM command in which a flag indicative of acommunication direction indicates one-way, the device starts datatransmission without waiting for a response from a reception station.

The wireless communication device may be arranged so that, when thedevice receives an SNRM command in which a flag indicative of acommunication direction is added and the flag indicates one-way, thedevice enters a mode for receiving a data packet, without transmitting aUA response.

The mobile phone including a transmission/reception function of thepresent invention may carry out a connection process and a disconnectionprocess by positioning the upper layer data in an SNRM command or in aUA response. Further, the mobile phone may be arranged so that a flagfor indicating a one-way communication or two-way communication isprovided in an SNRM command, the SNRM command is transmitted orreceived, and in a case of one-way communication, the transmitter maytransfer data without waiting for a response after transmitting an SNRM,and the receiver may receive data without transmitting a response.

The display device including a transmission/reception function of thepresent invention may carry out a connection process and a disconnectionprocess by positioning the upper layer data in an SNRM command or in aUA response. Further, the mobile phone may be arranged so that a flagfor indicating a one-way communication or two-way communication isprovided in an SNRM command, the SNRM command is transmitted orreceived, and in a case of one-way communication, the transmitter maytransfer data without waiting for a response after transmitting an SNRM,and the receiver may receive data without transmitting a response.

The printing device including a transmission/reception function of thepresent invention may carry out a connection process and a disconnectionprocess by positioning the upper layer data in an SNRM command or in aUA response. Further, the mobile phone may be arranged so that a flagfor indicating a one-way communication or two-way communication isprovided in an SNRM command, the SNRM command is transmitted orreceived, and in a case of one-way communication, the transmitter maytransfer data without waiting for a response after transmitting an SNRM,and the receiver may receive data without transmitting a response.

The recording device including a transmission/reception function of thepresent invention may carry out a connection process and a disconnectionprocess by positioning the upper layer data in an SNRM command or in aUA response. Further, the mobile phone may be arranged so that a flagfor indicating a one-way communication or two-way communication isprovided in an SNRM command, the SNRM command is transmitted orreceived, and in a case of one-way communication, the transmitter maytransfer data without waiting for a response after transmitting an SNRM,and the receiver may receive data without transmitting a response.

Each block of the transmitters (communication device) 1 and 3 and of thereceiver (communication device) 2, particularly LAP layers 100A to 100D,may be constituted of a hardware logic, or may be realized by softwareby using a CPU, as detailed below.

Specifically, the transmitters 1 and 3 and the receiver 2 include, forexample, a CPU (Central Processing Unit) for carrying out commands of acontrol program for realizing each function, a ROM (Read Only Memory)for storing the program; a RAM (Random Access Memory) for developing theprogram; and a storage device (storage medium) such as a memory forstoring the program and the various data. Further, when the functions ofthe transmitters 1 and 3 and the receiver 2 are realized by software,the program code (execute form program, intermediate code program,source program) of the control program (communication program) is storedin a program medium readable by a computer, which medium is mounted tothe transmitters 1 and 3 and the receiver 2. In this way, the objectiveof the present invention may also be achieved by causing the computer(or CPU, MPU) to read out the program code from the storage medium, andcarry out the program code to activate the functions.

The storage medium may be tape based, such as a magnetic tape orcassette tape; disc based, such as a magnetic disc like a floppy disc®,hard disc or an optical disc such as CD/MO/MD/DVD/CD-R; card based, suchas an IC card (including a memory card), an optical card; or asemiconductor memory, such as a mask ROM, EPROM, EEPROM, and a flashROM.

Further, the transmitters 1 and 3 and the receiver 2 may be constitutedto be connectable to a communication network, so as to allow provisionof the program code via a communication network. The communicationnetwork is not particularly limited, and it may be: the Internet,Intranet, Extranet, LAN, ISDN, VAN, CATV communication network, virtualprivate network, telecommunication network, mobile body communicationnetwork, satellite communication network etc. Further, a transmissionmedium for constituting the communication network is not particularlylimited, and it may be wired based, such as IEEE1394, USB, power-linecarrier, cable TV line, telephone line, ADSL line, or radio based, suchas infrared medium such as IrDA, remote control, Bluetooth®, 802.11radio, HDR, mobile phone network, satellite communication line, groundwave digital network. Note that, the present invention can be realizedby a series of computer data signals which represent the aforesaidprogram code, and which are electrically transmitted, and which areembedded in a carrier wave.

As described above, the communication device of the present invention isa communication device, serving as a primary station which carries outcommunication with a secondary station, including a first protocolcontrol section for transmitting a first connection request commandwithout transmitting a station-search command to confirm a presence ofthe secondary station, so that a communication connection between thecommunication device and the secondary section is established.

Further, the communication device of the present invention is acommunication device, serving as a secondary station which carries outcommunication with a primary station, including a first protocol controlsection for, when receiving a first connection request command from theprimary station without receiving a station-search command with whichthe primary station confirms a presence of the secondary station,transmitting a connection response to the first connection requestcommand, so that a connection is established.

Further, the communication method of the present invention is acommunication method of a communication device serving as a primarystation which carries out communication with a secondary station,including the step of transmitting a first connection request commandwithout transmitting a station-search command to confirm a presence ofthe secondary station, so that a communication connection between thecommunication device and the secondary station is established.

Further, the communication method of the present invention is acommunication method of a communication device serving as a secondarystation which carries out communication with a primary station,including the step of transmitting a connection response to a firstconnection request command from the primary station so that a connectionis established, when the communication device receives the firstconnection request command without receiving a station-search commandwith which the primary station confirms a presence of the secondarystation.

Further, the communication system of the present invention is acommunication system, including a communication device serving as theprimary station and a communication device serving as the secondarystation.

With the arrangements and the methods, when the primary stationestablishes a communication connection with the secondary station, theprimary station transmits a connection request command (e.g. SNRM inIrSimple) without transmitting a station-search command (e.g. XID inIrDA) with which the primary station confirms the presence of thesecondary station. On the other hand, when the secondary stationreceives the connection request command (corresponding to SNRM) from theprimary station without receiving the station-search command(corresponding to XID) with which the primary station confirms thepresence of the secondary station, the secondary station transmits aconnection response (e.g. UA in IrSimple) to the connection requestcommand.

With the above connection sequence, it is unnecessary to carry out acommunication for searching a station. Consequently, a connectionsequence is made simpler, which has an effect of reducing a timenecessary for commutation connection.

Further, the communication device of the present invention furtherincludes: a second protocol control section for transmitting astation-search command to confirm a presence of the secondary stationand then transmitting a second connection request command, so that acommunication connection between the communication device and thesecondary section is established; and a protocol switching section forcausing the second protocol control section to transmit thestation-search command when the first protocol control section transmitsthe first connection request command and then does not receive aconnection response to the first connection request command from thesecondary station within a predetermined time.

Further, the communication device of the present invention furtherincludes: a second protocol control section for transmitting astation-search response to the station-search commands from the primarystation, and then transmitting a connection response to a secondconnection request command, so that a connection is established; and aprotocol switching section for causing the second protocol controlsection to transmit the station-search response, when the communicationdevice receives two or more of the station-search commands in whichwhole slot numbers are set to 1, or receives one of the station-searchcommands in which whole slot numbers are set to a number other than 1,without receiving the first connection request command from the primarystation.

With the arrangements, in the primary station, when the first protocolcontrol section (e.g. IrSimple) transmits a first connection requestcommand (e.g. SNRM in IrSimple) and then does not receive a connectionresponse (e.g. UA in IrSimple) to the first connection request commandfrom the secondary station within a predetermined time, the protocolswitching section switches to the second protocol control section (e.g.IrDA) and causes the second protocol control section to transmit astation-search command (e.g. XID in IrDA). On the other hand, when thesecondary station receives two or more of the station-search commands(e.g. XID in IrDA) in which whole slot numbers are set to 1, or receivesone of the station-search commands (e.g. XID in IrDA) in which wholeslot numbers are set to a number other than 1, without receiving thefirst connection request command (corresponding to SNRM in IrSimple)from the primary station, the protocol switching section switches to thesecond protocol control section (e.g. IrDA) and causes the secondprotocol control section to transmit a station-search response (e.g. XIDin IrDA).

The first protocol allows establishment of connection only by exchanginga connection request command and a connection response withoutexchanging a station-search command and a station-search response. Onthe other hand, the second protocol allows establishment of connectionby exchanging a connection request command and a connection responseafter exchanging a station-search command and a station-search response.

With the above connection sequence, if a connection by the firstprotocol results in failure, then it is possible to try connection bythe second protocol. Consequently, regardless of whether the primarystation and the secondary station support the first protocol or thesecond protocol (the primary station and the secondary station maysupport both of the protocols), it is possible to establish a connectiononly by exchanging a connection request command—a connection responseand a station-search command—a station-search response. That is, it ispossible to establish a connection by selecting a protocol which can beestablished between the primary station and the secondary station,without clearly specifying a protocol used in the connection.

Therefore, when both the primary station and the secondary stationsupport the first protocol, the first protocol allows establishing aconnection between the primary station and the secondary station in ashort time. When otherwise, the second protocol allows establishing aconnection between the stations.

Further, the communication device of the present invention is arrangedso that, when the second protocol control section transmits thestation-search command and then does not receive a station-searchresponse to the station-search command from the secondary station withina predetermined time, the protocol switching section causes the firstprotocol control section to transmit the first connection requestcommand.

Further, the communication device of the present invention is arrangedso that, when the protocol switching section receives one of thestation-search commands in which whole slot numbers are set to 1 andthen receives the first connection request command, the protocolswitching section causes the first protocol control section to transmitthe connection response to the first connection request command.

With the arrangements, in the primary station, when the second protocolcontrol section (e.g. IrDA) transmits the station-search command (e.g.XID in IrDA) and then does not receive a station-search response (e.g.XID in IrDA) to the station-search command from the secondary stationwithin a predetermined time, the protocol switching section switches tothe first protocol control section (e.g. IrSimple) and causes the firstprotocol control section to transmit the first connection requestcommand (e.g. SNRM in IrSimple). On the other hand, in the secondarystation, when the protocol switching section receives one of thestation-search commands (e.g. XID in IrDA) in which whole slot numbersare set to 1 and then receives the first connection request command(e.g. SNRM in IrSimple), the protocol switching section causes the firstprotocol control section (corresponding to IrSimple) to transmit theconnection response (corresponding to UA in IrSimple) to the firstconnection request command.

With the above connection sequence, if a connection by the secondprotocol results in failure, then it is possible to try connection bythe first protocol. Consequently, regardless of whether the primarystation and the secondary station support the first protocol or thesecond protocol (the primary station and the secondary station maysupport both of the protocols), it is possible to establish a connectiononly by exchanging a connection request command—a connection responseand a station-search command—a station-search response. That is, it ispossible to establish a connection by selecting a protocol which can beestablished between the primary station and the secondary station,without clearly specifying a protocol used in the connection.

Therefore, when both the primary station and the secondary stationsupport the first protocol, the first protocol allows establishing aconnection between the primary station and the secondary station in ashort time. When otherwise, the second protocol allows establishing aconnection between the stations.

Further, the communication device of the present invention is arrangedso that the first protocol control section assigns informationindicative of any secondary station to a field of the first connectionrequest command which field specifies a secondary station.

Further, the communication device of the present invention is arrangedso that the first protocol control section transmits the connectionresponse only when information indicative of any secondary station isassigned to a field of the first connection request command which fieldspecifies a secondary station.

With the arrangements, the primary station assigns informationindicative of any secondary station to a field of the first connectionrequest command which field specifies a secondary station. For example,when the first connection request command is SNRM in IrSimple,0xFFFFFFFF is assigned to Destination Device Address. In IrDA,0xFFFFFFFF of Destination Device Address is unused code. On the otherhand, the secondary station transmits the connection response only wheninformation indicative of any secondary station is assigned to a fieldof the first connection request command which field specifies asecondary station.

Consequently, the secondary station can judge whether a received commandis the first connection request command or the second connection requestcommand according to whether an identifier (address) of a specificsecondary station is assigned to a field of the connection requestcommand which field specifies a secondary station or informationindicative of any secondary station is assigned to the field.

Therefore, it is unnecessary to provide a new field so as to indicatewhether a connection request command is in compliance with the firstprotocol or the second protocol. Consequently, it is possible to providea common format both for the format of the first connection requestcommand of the first protocol and for the second connection requestcommand of the second protocol.

Further, the communication device of the present invention is arrangedso that the first protocol control section transmits the firstconnection request command in which information indicative of one-way isassigned to a field for specifying a communication direction, and aftera predetermined time, the first protocol control section starts datatransfer.

Further, the communication device of the present invention is acommunication device, serving as a secondary station which carries outcommunication with a primary station, including a first protocol controlsection for establishing connection and entering a data transferablemode without transmitting a connection response to a first connectionrequest command from the primary station, when the communication devicereceives the first connection request command without receiving astation-search command with which the primary station confirms apresence of the secondary station and information indicative of one-wayis assigned to a field of the first connection request command whichfield specifies a communication direction.

With the arrangements, in the primary station, the first protocolcontrol section (e.g. IrSimple) transmits the first connection requestcommand (e.g. SNRM in IrSimple) in which information indicative ofone-way is assigned to a field for specifying a communication direction,and after a predetermined time, the first protocol control sectionstarts data transmission. On the other hand, when the secondary stationreceives the first connection request command from the primary stationand information indicative of one-way is assigned to a field of thefirst connection request command which field specifies a communicationdirection, the secondary station enters a data transferable mode withouttransmitting a connection response to the first connection requestcommand from the primary station.

This allows one-way communication from the primary station to thesecondary station in which communication the secondary station does nottransmit response to the primary station.

Note that, the communication device may be realized by a computer. Atthat time, the present invention includes: a communication program whichcauses a computer to function as each section of the communicationdevice and thus realizes the communication device by the computer; and acomputer-readable storage medium in which the communication program isstored.

Further, the communication device may be realized by a communicationcircuit which functions as each section of the communication device.

Further, the communication device is preferably applicable to a mobilephone which carries out communication using the communication device.

Further, the communication device is preferably applicable to a displaydevice which carries out display based on data received by thecommunication device.

Further, the communication device is preferably applicable to a printingdevice which carries out printing based on data received by thecommunication device.

Further, the communication device is preferably applicable to arecording device which records data received by the communicationdevice.

Lastly, the communication device of the present invention may beconstituted as follows.

(1. Transmission of SNRM from Primary Station)

The communication method [1] of the present invention may be acommunication method for transmitting/receiving a predetermined amountof transfer data using an infrared ray, including the step of, in adisconnection state, transmitting an SNRM command serving as aconnection request packet without transmitting an XID command serving asa station-search packet to confirm a presence of the other station, sothat a connection with the other station is established.

(2. Transmission of SNRM and Transmission of XID from Primary Station)

The communication method [2] of the present invention may be acommunication method for transmitting/receiving a predetermined amountof transfer data using an infrared ray, including the steps of, in adisconnection state, transmitting an SNRM command serving as aconnection request packet and thereafter, transmitting an XID commandserving as a station-search packet when it is judged that there is noresponse within a predetermined time, so that searching of a station iscarried out.

(3. Destination Device Address in SNRM is Global Address)

The communication method of the present invention may be thecommunication method [1] or [2], wherein 0xFFFFFFFF (global address) isassigned to a Destination Device Address field in the SNRM command.

(4. Upper Layer Data is Put in SNRM)

The communication method [4] of the present invention may be thecommunication method [1] or [2], wherein connection request data of anupper layer in particular is put in the SNRM command to be transmitted.

(5. CONNECT in OBEX is Put in Upper Layer Data in SNRM)

The communication method of the present invention may be thecommunication method [4], wherein at least a CONNECT command in an OBEXlayer is included in connection request data of the upper layer.

(6. IrDA Connection when Receiving XID Response to XID Command afterTransmission of SNRM)

The communication method of the present invention may be thecommunication method [2], further comprising the steps of, when an XIDresponse is sent back for the XID command, transmitting an XID-End andthen entering a connection sequence in existing IrDA, and when aresponse is not sent back for the XID command within a predeterminedtime, transmitting XID-End and then transmitting the SNRM command, sothat a connection is established.

(7. Upper Layer Data of SNRM is in PI, PL, and PV Formats)

The communication method of the present invention may be thecommunication method [4], wherein, before the connection request data ofthe upper layer, a predetermined identifier in accordance with a formatof an identifier which is a connection parameter in existing IrDA andthe length of the connection request data are positioned.

(8. Connection is Established when Receiving UA for SNRM)

The communication method [8] of the present invention may be thecommunication method [1] or [2], further including the step ofestablishing a connection and starting data transmission, when receivinga UA response within a predetermined time after transmitting the SNRMcommand.

(9. Connection is Established Only when UA Includes Upper Layer Data)

The communication method [9] of the present invention may be thecommunication method [8], wherein the connection is established and datatransmission is started, only when the UA response includes upper layerdata.

(10. Connection is Established Only when Upper Layer Data of UA IncludesSUCCESS in OBEX)

The communication method of the present invention may be thecommunication method [9], wherein the upper layer data includes aSUCCESS response in an OBEX layer.

(11. Flag Indicative of One-Way or Two-Way Communication is Positionedin SNRM)

The communication method [11] of the present invention may be thecommunication method [1] or [2], wherein the SNRM command in particularincludes a field in which a communication direction control flagindicative of one-way communication or two-way communication ispositioned, and when the communication direction control flag indicatesone-way communication, data transmission is started after apredetermined time has passed.

(12. Communication Direction Control Flag is in PI, PL, and PV Formats)

The communication method of the present invention may be thecommunication method [11], wherein, before the field in which thecommunication direction control flag is positioned, a predeterminedidentifier in accordance with a format of an identifier which is aconnection parameter in existing IrDA and the length of the field arepositioned.

(13. Receiving End Transmits UA Response after Receiving SNRM Instead ofXID Command)

The communication method [13] of the present invention may be acommunication method for transmitting/receiving a predetermined amountof transfer data using an infrared ray, including the step of, in adisconnection state, transmitting a UA response which is a connectionresponse packet, when receiving an SNRM command which is a connectionrequest packet without receiving an XID command which is astation-search packet.

(14. Receiving End does not Respond to First XID Command with SlotNumber 1)

The communication method [14] of the present invention may be acommunication method for transmitting/receiving a predetermined amountof transfer data using an infrared ray, including the step of, in adisconnection state, receiving XID commands which are station-searchpackets, and not transmitting an XID response to a first XID command outof the XID commands when the XID command includes a Discovery Flag fieldindicating that whole slot numbers are 1.

(15. Receiving End Transmits XID Response when Receiving Two or More XIDCommands with Slot Number 1)

The communication method of the present invention may be thecommunication method [14], further including the step of, upon receptionof two or more XID commands whose whole slot numbers are 1 and withoutreception of an SNRM command, transmitting an XID response and thenreceiving an XID-End from the other station, so that a station-searchprocess in existing IrDA is finished.

(16. IrDa Connection by Transmitting XID Response after Receiving XIDCommand without Slot Number 1)

The communication method of the present invention may be thecommunication method [14], further including the step of, upon receptionof an XID command whose whole slot numbers are not 1, transmitting anXID response and then receiving an XID-End command from the otherstation, so that a station-search process in existing IrDA is finished.

(17. Receiving End Transmits UA when Receiving SNRM After Receiving OneXID)

The communication method [17] of the present invention may be thecommunication method [14], further including the step of, upon receptionof an SNRM command after reception of one XID command with whole slotnumber 1, transmitting a UA response, so that a connection isestablished.

(18)

The communication method of the present invention may be thecommunication method [13] or [17], wherein the UA response istransmitted and a connection is established only when 0xFFFFFFFF isassigned to a Destination Device Address field of the SNRM command.

(19)

The communication method [19] of the present invention may be thecommunication method [13] or [17], wherein connection response data ofan upper layer is positioned in the UA response to be transmitted.

(20)

The communication method of the present invention may be thecommunication method [19], wherein the connection response data of theupper layer includes at least a SUCCESS response in an OBEX layer.

(21)

The communication method of the present invention may be thecommunication method [19], wherein, before the connection response dataof the upper layer, a predetermined identifier in accordance with aformat of an identifier which is a connection parameter in existing IrDAand the length of the connection response data are positioned.

(22)

The communication method [22] of the present invention may be thecommunication method [13] or [17], wherein the UA response istransmitted only when the SNRM command includes upper layer data.

(23)

The communication method of the present invention is the communicationmethod [22], wherein the upper layer data is a CONNECT command in theOBEX layer.

(24. Transmission of DM for First SNRM)

The communication method [24] of the present invention may be acommunication method for transmitting/receiving a predetermined amountof transfer data using an infrared ray, including the step of, in adisconnection state, transmitting a DM response indicative of refusal ofa connection when a first received packet is an SNRM command, so that adisconnection is carried out.

(25. Transmission of DM for SNRM after Receiving XID with 1 Slot)

The communication method [25] of the present invention may be thecommunication method [14], further including the step of, in adisconnection state, upon reception of an SNRM command after receptionof one XID command whose whole slot numbers are 1, transmitting a DMresponse indicative of refusal of a connection, so that a disconnectionis carried out.

(26. Upper Layer Data is Positioned in Connection Refusal DM)

The communication method [26] of the present invention may be thecommunication method [24] or [25], wherein connection refusal data of anupper layer is positioned in the DM response to be transmitted.

(27. Upper Layer Data in Connection Refusal DM is Internal Server Error)

The communication method of the present invention may be thecommunication method [26], wherein the connection refusal data of theupper layer includes at least an Internal Server Error response in anOBEX layer.

(28. Upper Layer Data in Connection Refusal DM is in PI, PL, and PVFormats)

The communication method of the present invention may be thecommunication method [26], wherein, before the connection refusal dataof the upper layer, a predetermined identifier in accordance with aformat of an identifier which is a connection parameter in existing IrDAand the length of the connection refusal data are positioned.

(29. UA is not Sent Back when Communication Direction Control Flag inSNRM Indicates One-Way Communication)

The communication method [29] of the present invention may be acommunication method for transmitting/receiving a predetermined amountof transfer data using an infrared ray, including the step of, in adisconnection state, upon reception of an SNRM command which is aconnection request packet, entering a data transferable state withouttransmitting a UA response, when the SNRM command includes thecommunication direction control flag indicative of one-way communicationor two-way communication in a predetermined format and the flagindicates one-way communication.

(30. Data Transferable State is Entered Only when SNRM IncludesCommunication Direction Control Flag Indicative of One-Way and IncludesUpper Layer Data)

The communication method of the present invention may be thecommunication method [29], wherein the data transferable state isentered only when the SNRM command includes upper layer data.

(31. Data Transferable State is Entered Only when SNRM includesCommunication Direction Control Flag Indicative of One-Way and IncludesUpper Layer Data (Connect in OBEX))

The present communication method of the present invention may be thecommunication method [29], wherein the upper layer data includes atleast a CONNECT command in an OBEX layer.

(32. Upper Layer Data is Positioned in Disc)

The communication method [32] of the present invention may be acommunication method for transmitting/receiving a predetermined amountof transfer data using an infrared ray, including the step of, in aconnection state, positioning disconnection request data of an upperlayer in a DISC command which is a disconnection request, andtransmitting the disconnection request data.

(33. DISCONNECT in OBEX is Positioned in Upper Layer Data in DISC)

The communication method of the present invention may be thecommunication method [32], wherein the disconnection request data of theupper layer includes at least a DISCONNECT command in an OBEX layer.

(34. Upper layer data in DISC is in PI, PL, and PV Formats)

The communication method of the present invention is the communicationmethod [32], wherein, before the disconnection request data of the upperlayer, a predetermined identifier in accordance with a format of anidentifier which is a connection parameter in existing IrDA and thelength of the disconnection request data are positioned.

(35. Upper Layer Data is Positioned in UA when UA is Transmitted forDISC)

The communication method [35] of the present invention is acommunication method for transmitting/receiving a predetermined amountof transfer data using an infrared ray, including the step of, in aconnection state, upon transmission of a UA response to a received DISCcommand, positioning disconnection request data of an upper layer in theUA response.

(36)

The communication method of the present invention may be thecommunication method [35], wherein the upper layer data includes atleast a SUCCESS response in an OBEX layer.

(37)

The communication method of the present invention may be thecommunication method [35], wherein, before the disconnection requestdata of the upper layer, a predetermined identifier in accordance with aformat of an identifier which is a connection parameter in existing IrDAand the length of the disconnection request data are positioned.

(38. Upper Layer Data is Positioned in DM when DM is Transmitted afterEstablishment of Connection)

The communication method [38] of the present invention may be acommunication method for transmitting/receiving a predetermined amountof transfer data using an infrared ray, including the step of, in aconnection state, upon transmission of a DM response to a disconnectionrequest from an upper layer, positioning disconnection request data ofthe upper layer in the DM response.

(39. Internal Server Error in OBEX is Positioned in DM when DM isTransmitted after Establishment of Connection)

The communication method of the present invention is the communicationmethod [38], wherein the upper layer data includes at least an InternalServer Error response in an OBEX layer.

(40)

The communication method of the present invention may be thecommunication method [38], wherein, before the disconnection requestdata of the upper layer, a predetermined identifier in accordance with aformat of an identifier which is a connection parameter in existing IrDAand the length of the disconnection request data are positioned.

(41. Transmission Circuit, Reception Circuit, Transmission and ReceptionCircuit)

The transmission circuit, reception circuit, transmission and receptioncircuit of the present invention can realize any one of thecommunication methods.

(42. Mobile Phone)

The mobile phone of the present invention can realize any one of thecommunication methods.

(43. Display Device)

The display device of the present invention can realize any one of thecommunication methods.

(44. Printing Device)

The printing device of the present invention can realize any one of thecommunication methods.

(45. Recording Device)

The recording device of the present invention can realize any one of thecommunication methods.

Further, the communication method of the present invention may be acommunication method for transmitting a predetermined amount of transferdata using an infrared ray, including the step of transmitting an SNRMcommand to the other station without transmitting a station-searchcommand (XID) for searching the other station, the SNRM commandincluding connection parameters such as maximum transferable speed andmaximum receivable data length of a transmitter.

Further, the communication method of the present invention may be acommunication method for receiving a predetermined amount of transferdata using an infrared ray, including the step of transmitting a UAresponse including parameters such as maximum transferable speed andmaximum receivable data length of a receiver, when a first command froma transmitter is an SNRM command including parameters such as maximumtransferable speed and maximum receivable speed of the transmitter.

Further, the communication method of the present invention may bearranged so that 0xFFFFFFFF is assigned to a Destination Device Addressfield in an SNRM command.

Further, the communication method of the present invention may bearranged so that the UA response is immediately transmitted only when0xFFFFFFFF is assigned to the Destination Device Address field in thereceived SNRM command.

Further, the communication method of the present invention may bearranged so that an SNRM command includes an area in which upper layeruser data is put, and the upper layer user data as well as theconnection parameters are transmitted.

Further, the communication method of the present invention may bearranged so that the upper layer user data includes a CONNECT command inOBEX.

Further, the communication method of the present invention may bearranged so that a UA response includes an area in which upper layeruser data is put, and the upper layer user data as well as theconnection parameters are transmitted.

Further, the communication method of the present invention may bearranged so that the upper layer user data includes a SUCCESS responsein OBEX.

Further, the communication method of the present invention is acommunication method for transmitting a predetermined amount of transferdata using an infrared ray to the receiver, including the step oftransmitting upper layer user data by providing a DISC command with anarea to which the upper layer user data is put.

Further, the communication method of the present invention may bearranged so that the upper layer user data includes a DISCONNECT commandin OBEX.

Further, the communication method of the present invention may bearranged so that a connection or a disconnection of all layers (fromlower layers to upper layers) is carried out by only one exchange ofpackets.

Further, the communication method may be a communication methodincluding the step of transmitting an XID command, when a UA responsefrom the other station is not received after a predetermined time haspassed since transmission of the SNRM command.

Further, the communication method of the present invention may be amethod including the steps of, upon reception of an XID response to theXID command, transmitting an XID-END command and thereafter transmittingan SNRM command in IrDA, so that a connection process in IrDA isentered.

Further, the communication method of the present invention may be acommunication method including the steps of: transmitting the XIDcommand; transmitting an XID-END command when an XID response is notreceived from the other station after a predetermined time has passedsince transmission of the XID command; and transmitting the SNRM commandagain after a predetermined time has passed.

Further, the communication method may be a communication methodincluding the steps of: when an XID command is received as a firstcommand, storing reception of the XID command and thereafter; when anSNRM command is not received but an XID command which is not an XID-ENDcommand is received again, transmitting an XID response in accordancewith a rule defined by IrDA.

Further, the communication method of the present invention may be acommunication method, including the steps of: when an XID command isreceived as a first command, storing reception of the XID command andthereafter; when an SNRM command is received without a receiver'stransmission of an XID response, transmitting the UA response.

Further, the communication method of the present invention may be acommunication method, including the steps of: when an XID command isreceived as a first command, checking a value in a Discovery Flag areain the XID command and thereafter; when the XID slot indicates 6, 8, or16, transmitting an XID response in accordance with a rule defined byIrDA.

Further, the communication method of the present invention may bearranged so that a flag indicative of one-way communication or two-waycommunication is added to an SNRM command and the flag as well as theconnection parameters are transmitted.

Further, the communication method of the present invention may be acommunication method, including the steps of: transmitting an SNRMcommand in which a flag indicates one-way communication and thereafter;starting data transmission without waiting for a response from areceiving end.

Further, the communication method of the present invention may bearranged so that, when receiving an SNRM command to which a flagindicative of a communication direction is added and the communicationdirection is set to be one-way communication, a data packet receivablestate is entered without transmitting a UA response.

Further, the transmission and reception circuit of the present inventionincludes circuit elements allowing the communication methods.

Further, the transmitter and receiver of the present invention includecircuit configurations allowing the communication methods.

The embodiments and concrete examples of implementation discussed in theforegoing detailed explanation serve solely to illustrate the technicaldetails of the present invention, which should not be narrowlyinterpreted within the limits of such embodiments and concrete examples,but rather may be applied in many variations within the spirit of thepresent invention, provided such variations do not exceed the scope ofthe patent claims set forth below.

INDUSTRIAL APPLICABILITY

Since the present invention allows reduction of a connection time, thepresent invention is widely applicable to communication devices.Particularly, the present invention is preferably applicable tocommunication devices having optical communication function, e.g.portable wireless communication devices used for notebook computers,PDAs, mobile phones, and digital cameras etc.

1. A communication device, serving as a primary station which carriesout communication with a secondary station, comprising: a first protocolcontrol section for transmitting a first connection request command, sothat a communication connection between the communication device and thesecondary section is established; a second protocol control section fortransmitting a station-search command to confirm a presence of thesecondary station and then transmitting a second connection requestcommand, so that a communication connection between the communicationdevice and the secondary section is established; and a protocolswitching section for causing the second protocol control section totransmit the station-search command when the first protocol controlsection transmits the first connection request command and then does notreceive a connection response to the first connection request commandfrom the secondary station within a predetermined time.
 2. Thecommunication device as set forth in claim 1, wherein, when the secondprotocol control section transmits the station-search command and thendoes not receive a station-search response to the station-search commandfrom the secondary station within a predetermined time, the protocolswitching section causes the first protocol control section to transmitthe first connection request command.
 3. A communication device, servingas a secondary station which carries out communication with a primarystation, comprising: a first protocol control section for, whenreceiving a first connection request command from the primary station,transmitting a connection response to the first connection requestcommand, so that a connection is established; a second protocol controlsection for transmitting a station-search response to a station-searchcommand from the primary station, and then transmitting a connectionresponse to a second connection request command, so that a connection isestablished; and a protocol switching section for causing the secondprotocol control section to transmit the station-search response, whenthe communication device receives two or more of the station-searchcommands in which whole slot numbers are set to 1, or receives one ofthe station-search commands in which whole slot numbers are set to anumber other than 1, without receiving the first connection requestcommand from the primary station.
 4. The communication device as setforth in claim 3, wherein when the communication device receives one ofthe station-search commands in which whole slot numbers are set to 1 andthen receives the first connection request command, the protocolswitching section causes the first protocol control section to transmitthe connection response to the first connection request command.
 5. Acommunication method of a communication device serving as a primarystation which carries out communication with a secondary station,comprising the steps of: transmitting a first connection request commandin accordance with a first protocol defining that the first connectionrequest command is to be transmitted so as to establish a communicationconnection with the secondary station, and thereafter; when thecommunication device does not receive a connection response to the firstconnection request command within a predetermined time, transmitting astation-search command to confirm a presence of the secondary station,in accordance with a second protocol defining that the station-searchcommand is to be transmitted and then a second connection requestcommand is to be transmitted so as to establish a communicationconnection with the secondary station.
 6. A communication method of acommunication device serving as a secondary station which carries outcommunication with a primary station, comprising the step of: when thecommunication device does not receive a first connection request commandfrom the primary station not in accordance with a first protocoldefining that a connection response is to be transmitted in response tothe first connection request command so as to establish a communicationconnection with the primary station, and when the communication devicereceives two or more station-search commands in which whole slot numbersare set to 1 or receives a station-search command in which whole slotnumbers are set to a number other than 1, transmitting a station-searchresponse in accordance with a second protocol defining that thestation-search response is to be transmitted to the station-searchcommand from the primary station and then a connection response is to betransmitted in response to a second connection request command, so as toestablish a communication connection with the primary station.
 7. Acommunication device, serving as a primary station which gets connectedwith a secondary station using an SNRM frame, the SNRM frame being atransmission/reception frame used in IrLAP (Infrared Link AccessProtocol) and having a control field set to an SNRM (Set Normal ResponseMode), said communication device transmitting the SNRM frame in whichinformation indicative of any secondary station is assigned to adestination address field, so as to establish a connection with thesecondary station.
 8. The communication device as set forth in claim 7,said communication device transmitting the SNRM frame including acommunication direction control field in which a value specifyingone-way communication not requiring a response from the secondarystation is set, and after a predetermined time, starting datatransmission.
 9. A communication device, serving as a secondary stationwhich gets connected with a primary station using an SNRM frame, theSNRM frame being a transmission/reception frame used in IrLAP (InfraredLink Access Protocol) and having a control field set to an SNRM (SetNormal Response Mode), when receiving the SNRM frame in whichinformation indicative of any secondary station is assigned to adestination address field, said communication device transmitting a UA(Unnumbered Acknowledgement) frame to carry out a connection response.10. The communication device as set forth in claim 9, wherein only whenthe received SNRM frame includes a communication direction control fieldto which a value specifying a two-way communication requiring a responsefrom the secondary station is assigned, the UA frame is transmitted soas to carry out a connection response.
 11. A communication device,serving as a secondary station which gets connected with a primarystation using an SNRM frame, the SNRM frame being atransmission/reception frame used in IrLAP (Infrared Link AccessProtocol) and having a control field set to an SNRM (Set Normal ResponseMode), when the received SNRM frame includes a communication directioncontrol field to which a value specifying one-way communication notrequiring a response from the secondary section is assigned, saidcommunication device finishing a connection process without transmittinga UA (Unnumbered Acknowledgement) frame.
 12. A communication method of acommunication device serving as a primary station which gets connectedwith a secondary station using an SNRM frame, the SNRM frame being atransmission/reception frame used in IrLAP (Infrared Link AccessProtocol) and having a control field set to an SNRM (Set Normal ResponseMode), comprising the step of: assigning information indicative of anysecondary station to a destination address field of the SNRM frame andtransmitting the SNRM frame, so that a connection between thecommunication device and the secondary station is established.
 13. Thecommunication method as set forth in claim 12, wherein the SNRM frameincluding a communication direction control field to which a valuespecifying one-way communication not requiring a response from thesecondary station is assigned is transmitted, and after a predeterminedtime passes, data transmission is started.
 14. A communication method ofa communication device serving as a secondary station which getsconnected with a primary station using an SNRM frame, the SNRM framebeing a transmission/reception frame used in IrLAP (Infrared Link AccessProtocol) and having a control field set to an SNRM (Set Normal ResponseMode), comprising the step of transmitting a UA (UnnumberedAcknowledgement) frame to carry out a connection response, when thecommunication device receives the SNRM frame in which informationindicative of any secondary station is assigned to a destination addressfield.
 15. The communication method as set forth in claim 14, whereinonly when the received SNRM frame includes a communication directioncontrol field to which a value specifying a two-way communicationrequiring a response from the secondary station is assigned, the UAframe is transmitted so as to carry out a connection response.
 16. Acommunication method of a communication device serving as a secondarystation which gets connected with a primary station using an SNRM frame,the SNRM frame being a transmission/reception frame used in IrLAP(Infrared Link Access Protocol) and having a control field set to anSNRM (Set Normal Response Mode), comprising the step of finishing aconnection process without transmitting a UA (UnnumberedAcknowledgement) frame, when the received SNRM frame includes acommunication direction control field to which a value specifyingone-way communication not requiring a response from the secondarystation is assigned.
 17. A communication system, comprising acommunication device as set forth in claim 1 and a communication deviceas set forth in claim
 3. 18. A communication system, comprising acommunication device as set forth in claim 1 and a communication deviceas set forth in claim
 9. 19. A communication system, comprising acommunication device as set forth in claim 7 and a communication deviceas set forth in claim
 3. 20. A communication system, comprising acommunication device as set forth in claim 7 and a communication deviceas set forth in claim
 9. 21. A communication program for causing acommunication device as set forth in any one of claims 1 to 4 and 7 to11 to operate, said communication program causing a computer to functionas each section of the communication device.
 22. A communication circuitfor causing a communication device as set forth in any one of claims 1to 4 and 7 to 11 to operate, said communication circuit functioning aseach section of the communication device.
 23. A mobile phone, comprisinga communication device as set forth in any one of claims 1 to 4 and 7 to11, said mobile phone carrying out communication using the communicationdevice.
 24. A display device, comprising a communication device as setforth in any one of claims 1 to 4 and 7 to 11, said display devicecarrying out display based on data received by the communication device.25. A printing device, comprising a communication device as set forth inany one of claims 1 to 4 and 7 to 11, said printing device carrying outprinting based on data received by the communication device.
 26. Arecording device, comprising a communication device as set forth in anyone of claims 1 to 4 and 7 to 11, said recording device recording datareceived by the communication device.